code: def make_query(self, ns):
      
      if issubclass(self.model_class, db.Model):
        query = db.Query(self.model_class, namespace=ns)
        for f in self.filters:
          query.filter("%s %s" % (f[0], f[1]), f[2])
      else:
        query = self.model_class.query(namespace=ns)
        for f in self.filters:
          query = query.filter(ndb.FilterNode(*f))
      return query
docs: Make a query of entities within this range.
  
      Query options are not supported. They should be specified when the query
      is run.
  
      Args:
        ns: namespace of this query.
  
      Returns:
        a db.Query or ndb.Query, depends on the model class's type.