def get_lineage_by_id(self, ids: Optional[AnyGenericIdentifier]=None, missing_rank: bool=False, desired_ranks: Union[(bool, Sequence[str])]=False, drop_ranks: Union[(bool, Sequence[str])]=False, **kwargs: Any) -> pd.Series:
    'Get taxonomy lineages by feature `ids`.\n\n        Parameters\n        ----------\n        ids\n            Either feature indices or None for all.\n        missing_rank\n            If True will generate prefix like `s__` or `d__`\n        desired_ranks\n            List of desired ranks to generate.\n            If False then will generate all main ranks\n        drop_ranks\n            List of ranks to drop from desired ranks.\n            This parameter only useful if `missing_rank` is True\n        kwargs\n            Compatibility.\n\n        Returns\n        -------\n            class:`pandas.Series` with consensus lineages and corresponding IDs\n        '
    if (ids is None):
        target_ids = self.xrid
    else:
        target_ids = np.asarray(ids)
    tmp_desired_ranks = (VALID_RANKS if (desired_ranks is False) else desired_ranks)
    total_valid_rids = self.xrid.isin(target_ids).sum()
    if (total_valid_rids == len(target_ids)):
        return generate_lineages_from_taxa(self.__internal_taxonomy.loc[target_ids], missing_rank, tmp_desired_ranks, drop_ranks)
    elif (total_valid_rids < len(target_ids)):
        return generate_lineages_from_taxa(self.__internal_taxonomy.loc[np.unique(target_ids)], missing_rank, tmp_desired_ranks, drop_ranks)
    else:
        raise ValueError('Invalid feature ids are provided.')
Get taxonomy lineages by feature `ids`.

Parameters
----------
ids
    Either feature indices or None for all.
missing_rank
    If True will generate prefix like `s__` or `d__`
desired_ranks
    List of desired ranks to generate.
    If False then will generate all main ranks
drop_ranks
    List of ranks to drop from desired ranks.
    This parameter only useful if `missing_rank` is True
kwargs
    Compatibility.

Returns
-------
    class:`pandas.Series` with consensus lineages and corresponding IDs
def get_lineage_by_id(self, ids: Optional[AnyGenericIdentifier]=None, missing_rank: bool=False, desired_ranks: Union[(bool, Sequence[str])]=False, drop_ranks: Union[(bool, Sequence[str])]=False, **kwargs: Any) -> pd.Series:
    'Get taxonomy lineages by feature `ids`.\n\n        Parameters\n        ----------\n        ids\n            Either feature indices or None for all.\n        missing_rank\n            If True will generate prefix like `s__` or `d__`\n        desired_ranks\n            List of desired ranks to generate.\n            If False then will generate all main ranks\n        drop_ranks\n            List of ranks to drop from desired ranks.\n            This parameter only useful if `missing_rank` is True\n        kwargs\n            Compatibility.\n\n        Returns\n        -------\n            class:`pandas.Series` with consensus lineages and corresponding IDs\n        '
    if (ids is None):
        target_ids = self.xrid
    else:
        target_ids = np.asarray(ids)
    tmp_desired_ranks = (VALID_RANKS if (desired_ranks is False) else desired_ranks)
    total_valid_rids = self.xrid.isin(target_ids).sum()
    if (total_valid_rids == len(target_ids)):
        return generate_lineages_from_taxa(self.__internal_taxonomy.loc[target_ids], missing_rank, tmp_desired_ranks, drop_ranks)
    elif (total_valid_rids < len(target_ids)):
        return generate_lineages_from_taxa(self.__internal_taxonomy.loc[np.unique(target_ids)], missing_rank, tmp_desired_ranks, drop_ranks)
    else:
        raise ValueError('Invalid feature ids are provided.')