code: def _operator(self, op, close_group=False):
          
          op = op.upper().strip()
          if op not in OP_LIST:
              raise ValueError("Error: '{}' is not a valid operator.".format(op))
          else:
              if close_group:
                  op = ") " + op + " ("
              else:
                  op = " " + op + " "
              self.__query["q"] += op
          return self
docs: Add an operator between terms.
          There must be a term added before using this method.
          All operators have helpers, so this method is usually not necessary to directly invoke.
  
          Arguments:
              op (str): The operator to add. Must be in the OP_LIST.
              close_group (bool): If ``True``, will end the current parenthetical
                  group and start a new one.
                  If ``False``, will continue current group.
  
                  Example::
                      "(foo AND bar)" is one group.
                      "(foo) AND (bar)" is two groups.
  
          Returns:
              SearchHelper: Self