def _decode(self, msgCls, data):
        """ Internally used method which is responsible for the heavy lifting.
        """
        rosMsg = msgCls()

        for (slotName, slotType) in zip(rosMsg.__slots__, rosMsg._slot_types):
            if slotName not in data:
                continue

            if '[]' == slotType[-2:]:
                listBool = True
                slotType = slotType[:-2]
            else:
                listBool = False

            field = data[slotName]

            if listBool and not isinstance(field, (list, tuple)):
                raise TypeError('Given data does not match the definition of '
                                'the ROS message.')

            if slotType == 'string':
                convFunc = _stringify
            elif slotType in self._BASE_TYPES:
                convFunc = self._BASE_TYPES[slotType]
            elif slotType in self._SPECIAL_TYPES:
                convFunc = self._SPECIAL_TYPES[slotType]().decode
            elif self._customTypes in slotType and _checkIsStringIO(field):
                convFunc = self._customTypes[slotType][0]().decode
            else:
                convFunc = partial(self._decode,
                                   self._loader.loadMsg(*slotType.split('/')))

            if listBool:
                convFunc = partial(map, convFunc)

            setattr(rosMsg, slotName, convFunc(field))

        return rosMsg
dataset/ETHPy150Open rapyuta/rce/rce-core/rce/util/converter.py/Converter._decode/swapped operands of `in`