code: def query(self, *tags, **kwtags):
      if len(tags) >= 1 and isinstance(tags[0], Query):
          if len(tags) > 1 or kwtags:
              raise TypeError(
                  "If the first argument to query is a Query,"
                  " there should be no other arguments.",
                  tags,
                  kwtags,
              )
          return self.__query__(tags[0])
      include = [tag[1:] for tag in tags if tag.startswith("+")]
      require = [tag[1:] for tag in tags if tag.startswith("&")]
      exclude = [tag[1:] for tag in tags if tag.startswith("-")]
      if len(include) + len(require) + len(exclude) < len(tags):
          raise ValueError(
              "All tags must start with one of the following"
              " characters: '+', '&' or '-'",
              tags,
          )
      return self.__query__(
          Query(
              include=include,
              require=require,
              exclude=exclude,
              subquery=kwtags,
          )
      )
  
imports: from __future__ import absolute_import, print_function, division
  import copy
  import sys
  from theano.compat import DefaultOrderedDict
  from theano.misc.ordered_set import OrderedSet
  from six import StringIO, integer_types
  from theano.gof import opt
  from theano import config
label_desc: Use image node_id 7 for calling the DB obj's underlying member method code with example usage: obj.query() and returns: self, self