code: def filter_query(self, query):
          
  
          for filter_class in list(self.filter_classes):
              query = filter_class().filter_query(self.request, query, self)
  
          return query
docs: Filter the given query using the filter classes specified on the view if any are specified.