def _struct(self, fields):
        old_json = self._json
        self._json = {'bit_start': self.used_bits(), 'fields': fields}
        self._markers.append({'at':self.used_bits(),'type':'struct(%s)'%str(fields)})
        result = {}
        for field in fields:
            if field[0] == '__parent':
                parent = self.instance(field[1])
                if isinstance(parent, dict):
                    result.update(parent)
                elif len(fields) == 1:
                    result = parent
                else:
                    result[field[0]] = parent
            else:
                result[field[0]] = self.instance(field[1])
        old_json[self.used_bits()%'struct%i'] = self._json
        self._json = old_json
        return result
dataset/ETHPy150Open karlgluck/heroes-of-the-storm-replay-parser/s2protocol/decoders.py/BitPackedDecoderDebug._struct/swapped operands of `%`