code: def query(self, querystring):
          
          mode = Database.MODE.READ_ONLY
          db = Database(path=self.path, mode=mode)
          q = db.create_query(querystring)
          # add configured exclude tags
          for tag in settings.get('exclude_tags'):
              q.exclude_tag(tag)
          return q
docs: creates :class:`notmuch.Query` objects on demand
  
          :param querystring: The query string to use for the lookup
          :type query: str.
          :returns: :class:`notmuch.Query` -- the query object.