def METHOD_NAME(self, model_dir):
    # type: (Text) -> Optional[Dict[Text, Any]]
    if self.synonyms:
        entity_synonyms_file = os.path.join(model_dir,
                                            ENTITY_SYNONYMS_FILE_NAME)
        write_json_to_file(entity_synonyms_file, self.synonyms,
                           separators=(',', ': '))
    return {"synonyms_file": ENTITY_SYNONYMS_FILE_NAME}