@classmethod
def __format_synonyms(cls, synonyms):
    """
        Returns a str that will be written in the output files for all
        the synonyms `synonyms`.
        """
    result = ''
    for syn_name in synonyms:
        if len(synonyms[syn_name]) > 1:
            result += '## synonym:' + syn_name + '\n'
            for syn in synonyms[syn_name]:
                if syn != syn_name:
                    result += '- ' + syn + '\n'
            result += '\n'
    return result
