def has(data, sub_data):
    # Recursive approach to look for a subset of data in data.
    # WARNING: Don't use on huge structures
    # :param data: Data structure
    # :param sub_data: subset being checked for
    # :return: True or False
    try:
        (item for item in data if item == sub_data).next()
        return True
    except __HOLE__:
        lists_and_dicts = list_or_dict(data)
        for item in lists_and_dicts:
            if has(item, sub_data):
                return True
    return False
dataset/ETHPy150Open CenterForOpenScience/osf.io/tests/test_notifications.py/has