code: def apply_search(queryset, search, schema=None):
      
      ast = DjangoQLParser().parse(search)
      schema = schema or DjangoQLSchema
      schema_instance = schema(queryset.model)
      schema_instance.validate(ast)
      return queryset.filter(build_filter(ast, schema_instance))
docs: Applies search written in DjangoQL mini-language to given queryset