code: def get_term_by_name(self, name):
          
          term = None
          func_name = 'get_term_by_name'
          try:
              term = self.terms[self._name2id[name]]
          except KeyError:
              try:
                  term = self.terms[self._syn2id[name]]
              except KeyError:
                  pass
              else:
                  logger.warning(
                      '%s: GO term name "%s" is a synonym for "%s".',
                      func_name, name, term.name)
  
          if term is None:
              raise ValueError('%s : GO term name "%s" not found!'
                               % (func_name, name))
  
          return term
docs: Get the GO term with the given GO term name.
  
          If the given name is not associated with any GO term, the function will
          search for it among synonyms.
  
          Parameters
          ----------
          name: str
              The name of the GO term.
  
          Returns
          -------
          GOTerm
              The GO term with the given name.
  
          Raises
          ------
          ValueError
              If the given name is found neither among the GO term names, nor
              among synonyms.