def __fix_taxon_names(self) -> None:
    'Fix invalid taxon names.'

    def taxon_fixer(taxon):
        if ((taxon is not None) and pd.notna(taxon)):
            tmp_taxon_trimmed = taxon.lower().strip()
            if (len(tmp_taxon_trimmed) > 0):
                if (tmp_taxon_trimmed[0] == '['):
                    tmp_taxon_trimmed = tmp_taxon_trimmed[1:]
                if (tmp_taxon_trimmed[(- 1)] == ']'):
                    tmp_taxon_trimmed = tmp_taxon_trimmed[:(- 1)]
                return tmp_taxon_trimmed.capitalize()
            else:
                return None
        else:
            return None
    self.__internal_taxonomy.loc[:, VALID_RANKS] = self.__internal_taxonomy.loc[:, VALID_RANKS].applymap(taxon_fixer)
Fix invalid taxon names.
def __fix_taxon_names(self) -> None:
    

    def taxon_fixer(taxon):
        if ((taxon is not None) and pd.notna(taxon)):
            tmp_taxon_trimmed = taxon.lower().strip()
            if (len(tmp_taxon_trimmed) > 0):
                if (tmp_taxon_trimmed[0] == '['):
                    tmp_taxon_trimmed = tmp_taxon_trimmed[1:]
                if (tmp_taxon_trimmed[(- 1)] == ']'):
                    tmp_taxon_trimmed = tmp_taxon_trimmed[:(- 1)]
                return tmp_taxon_trimmed.capitalize()
            else:
                return None
        else:
            return None
    self.__internal_taxonomy.loc[:, VALID_RANKS] = self.__internal_taxonomy.loc[:, VALID_RANKS].applymap(taxon_fixer)