def METHOD_NAME(custom_queries):
    if not custom_queries:
        return []
    with custom_queries as queries:
        try:
            data = json.load(queries)
            if isinstance(data, dict):
                data = [data]
        except ValueError as err:
            raise exceptions.SystemSetupError(f"Ensure JSON schema is valid and queries are contained in a list: {err}")
    return data