@classmethod
    def decode_obj(cls, obj):
        # Decode nested objects first.
        if isinstance(obj, dict):
            obj = dict((key, cls.decode_obj(val)) for (key, val) in obj.items())
        elif isinstance(obj, list):
            obj = list(cls.decode_obj(val) for val in obj)
        # Check if we have a tagged object.
        if not isinstance(obj, dict) or len(obj) != 1:
            return obj
        obj_tag = next(iter(obj.keys()))
        if not obj_tag.startswith('!'):
            return obj
        if json_tags not in obj_tag:
            raise ValueError('Unknown tag', obj_tag)
        obj_cls = json_tags[obj_tag]
        return obj_cls.decode_json_obj(obj[obj_tag])
dataset/ETHPy150Open nltk/nltk/nltk/jsontags.py/JSONTaggedDecoder.decode_obj/swapped operands of `not in`