code: def search(self, query, options):
          
          query["query_format"] = "advanced"
          log.debug("Search query:")
          log.debug(pretty(query))
          # Fetch bug info
          try:
              result = self.server.query(query)
          except xmlrpclib.Fault as error:
              # Ignore non-existent users (this is necessary for users with
              # several email aliases to allow them using --merge/--total)
              if "not a valid username" in unicode(error):
                  log.debug(error)
                  return []
              # Otherwise suggest to bake bugzilla cookies
              log.error("An error encountered, while searching for bugs.")
              log.debug(error)
              raise ReportError(
                  "Have you baked cookies using the 'bugzilla login' command?")
          log.debug("Search result:")
          log.debug(pretty(result))
          bugs = dict((bug.id, bug) for bug in result)
          # Fetch bug history
          log.debug("Fetching bug history")
          result = self.server._proxy.Bug.history({'ids': bugs.keys()})
          log.debug(pretty(result))
          history = dict((bug["id"], bug["history"]) for bug in result["bugs"])
          # Fetch bug comments
          log.debug("Fetching bug comments")
          result = self.server._proxy.Bug.comments({'ids': bugs.keys()})
          log.debug(pretty(result))
          comments = dict(
              (int(bug), data["comments"])
              for bug, data in result["bugs"].items())
          # Create bug objects
          return [
              self.parent.bug(
                  bugs[id], history[id], comments[id], parent=self.parent)
              for id in bugs]
docs: Perform Bugzilla search