def _log_record_strainer(self, thing):
        '''
        Prepare object for recording to log. The record must be able to be
        marshalled into JSON without using custom encoders, since this
        marshalling occurs after the log record has been emitted.

        Arguments:
        thing   --  The object that needs to be strained.

        Returns:
        The object converted into a state that can be emitted to the log.
        '''
        thing_type = type(thing)
        if [list, set, frozenset] in thing_type:
            new_thing = []
            for element in thing:
                new_thing.append(self._log_record_strainer(element))
            return new_thing
        elif thing_type is dict:
            new_thing = {}
            for key, value in thing.iteritems():
                new_key = self._log_record_strainer(key)
                new_value = self._log_record_strainer(value)
                new_thing[new_key] = new_value
            return new_thing
        elif thing_type is UUID:
            return str(thing)
        # JSON does not fully support NaN and Infinity in its spec, so some JSON libraries do not
        # handle these values and instead raise an error. Serializing these to the string
        # respresentation to prevent these errors from disrupting logging.
        elif thing_type is float:
            if isnan(thing):
                return 'NaN'
            elif isinf(thing):
                return 'Inf'
            else:
                return thing
        else:
            return thing
dataset/ETHPy150Open lmco/laikaboss/laikaboss/modules/log_fluent.py/LOG_FLUENT._log_record_strainer/swapped operands of `in`