def get_term_by_name(self, name):
term = None<EOL>try:<EOL><INDENT>term = self.terms[self.name2id[name]]<EOL><DEDENT>except KeyError:<EOL><INDENT>try:<EOL><INDENT>term = self.terms[self.syn2id[name]]<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>logger.info('<STR_LIT>',<EOL>name, term.name)<EOL><DEDENT><DEDENT>if term is None:<EOL><INDENT>raise ValueError('<STR_LIT>' % name)<EOL><DEDENT>return term<EOL>
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.