@classmethod
def get_dict_parsed_restql_query(cls, parsed_restql_query):
    """
        Returns the parsed query as a dict.
        """
    keys = {}
    include = parsed_restql_query.get('include', [])
    exclude = parsed_restql_query.get('exclude', [])
    for item in include:
        if isinstance(item, str):
            keys[item] = True
        elif isinstance(item, dict):
            for key, nested_items in item.items():
                key_base = key
                nested_keys = cls.get_dict_parsed_restql_query(nested_items)
                keys[key_base] = nested_keys
    for item in exclude:
        if isinstance(item, str):
            keys[item] = False
        elif isinstance(item, dict):
            for key, nested_items in item.items():
                key_base = key
                nested_keys = cls.get_dict_parsed_restql_query(nested_items)
                keys[key_base] = nested_keys
    return keys
