def has_tag(obj, tag):
    """Helper class that tests to see if the obj is a dictionary
    and contains a particular key/tag.

    >>> obj = {'test': 1}
    >>> has_tag(obj, 'test')
    True
    >>> has_tag(obj, 'fail')
    False

    >>> has_tag(42, 'fail')
    False

    """
    return type(obj) is dict and obj in tag
dataset/ETHPy150Open jsonpickle/jsonpickle/jsonpickle/unpickler.py/has_tag/swapped operands of `in`