def METHOD_NAME(schema, data):
    is_valid = True
    if isinstance(schema, dict):
        if not isinstance(data, dict):
            print("Invalid data type {} for {}. Expected dict".format(type(data), data))
            return False
        for key, data_type in schema.items():
            if key not in data:
                continue
            is_valid = METHOD_NAME(data_type, data[key])
            if not is_valid:
                break
    elif isinstance(schema, list):
        if not isinstance(data, list):
            print("Invalid data type {} for {}. Expected list".format(type(data), data))
            return False
        for ele in data:
            is_valid = METHOD_NAME(schema[0], ele)
            if not is_valid:
                break
    else:
        if not isinstance(data, schema):
            print("Invalid data type {} for {}. Expected {}".format(type(data), data, type(schema())))
            return False
    return is_valid