def __init_internal_taxonomy(self, taxonomy_data: Union[(pd.Series, pd.DataFrame)], taxonomy_notation: Optional[str]='greengenes', order_ranks: Optional[Sequence[str]]=None, **kwargs: Any) -> None:
    "Main method to initialize taxonomy.\n\n        Parameters\n        ----------\n        taxonomy_data\n            Incoming parsed taxonomy data\n        taxonomy_notation\n            Taxonomy lineage notation style. Can be one of\n                 :const:`pmaf.internals._constants.AVAIL_TAXONOMY_NOTATIONS`\n        order_ranks\n            List with the target rank order. Default is set to None.\n                The 'silva' notation require `order_ranks`.\n        kwargs\n            Compatibility\n        "
    if isinstance(taxonomy_data, pd.Series):
        new_taxonomy = self.__init_taxonomy_from_lineages(taxonomy_data, taxonomy_notation, order_ranks)
    elif isinstance(taxonomy_data, pd.DataFrame):
        if (taxonomy_data.shape[1] == 1):
            taxonomy_data_series = pd.Series(data=taxonomy_data.iloc[:, 0], index=taxonomy_data.index)
            new_taxonomy = self.__init_taxonomy_from_lineages(taxonomy_data_series, taxonomy_notation, order_ranks)
        else:
            new_taxonomy = self.__init_taxonomy_from_frame(taxonomy_data, taxonomy_notation, order_ranks)
    else:
        raise RuntimeError('`taxonomy_data` must be either pd.Series or pd.Dataframe')
    if (new_taxonomy is None):
        raise ValueError('Provided taxonomy is invalid.')
    self.__internal_taxonomy = new_taxonomy
    self.__fix_taxon_names()
    tmp_avail_ranks = [rank for rank in VALID_RANKS if (rank in new_taxonomy.columns)]
    self.__avail_ranks = [rank for rank in tmp_avail_ranks if new_taxonomy.loc[:, rank].notna().any()]
    self.__reconstruct_internal_lineages()
    self._init_state = True
Main method to initialize taxonomy.

Parameters
----------
taxonomy_data
    Incoming parsed taxonomy data
taxonomy_notation
    Taxonomy lineage notation style. Can be one of
         :const:`pmaf.internals._constants.AVAIL_TAXONOMY_NOTATIONS`
order_ranks
    List with the target rank order. Default is set to None.
        The 'silva' notation require `order_ranks`.
kwargs
    Compatibility
def __init_internal_taxonomy(self, taxonomy_data: Union[(pd.Series, pd.DataFrame)], taxonomy_notation: Optional[str]='greengenes', order_ranks: Optional[Sequence[str]]=None, **kwargs: Any) -> None:
    "Main method to initialize taxonomy.\n\n        Parameters\n        ----------\n        taxonomy_data\n            Incoming parsed taxonomy data\n        taxonomy_notation\n            Taxonomy lineage notation style. Can be one of\n                 :const:`pmaf.internals._constants.AVAIL_TAXONOMY_NOTATIONS`\n        order_ranks\n            List with the target rank order. Default is set to None.\n                The 'silva' notation require `order_ranks`.\n        kwargs\n            Compatibility\n        "
    if isinstance(taxonomy_data, pd.Series):
        new_taxonomy = self.__init_taxonomy_from_lineages(taxonomy_data, taxonomy_notation, order_ranks)
    elif isinstance(taxonomy_data, pd.DataFrame):
        if (taxonomy_data.shape[1] == 1):
            taxonomy_data_series = pd.Series(data=taxonomy_data.iloc[:, 0], index=taxonomy_data.index)
            new_taxonomy = self.__init_taxonomy_from_lineages(taxonomy_data_series, taxonomy_notation, order_ranks)
        else:
            new_taxonomy = self.__init_taxonomy_from_frame(taxonomy_data, taxonomy_notation, order_ranks)
    else:
        raise RuntimeError('`taxonomy_data` must be either pd.Series or pd.Dataframe')
    if (new_taxonomy is None):
        raise ValueError('Provided taxonomy is invalid.')
    self.__internal_taxonomy = new_taxonomy
    self.__fix_taxon_names()
    tmp_avail_ranks = [rank for rank in VALID_RANKS if (rank in new_taxonomy.columns)]
    self.__avail_ranks = [rank for rank in tmp_avail_ranks if new_taxonomy.loc[:, rank].notna().any()]
    self.__reconstruct_internal_lineages()
    self._init_state = True