def merge_duplicated_features(self, **kwargs: Any) -> Optional[Mapper]:
    'Merge features with duplicated taxonomy.\n\n        Parameters\n        ----------\n        kwargs\n            Compatibility\n        '
    ret = {}
    groupby = self.__internal_taxonomy.groupby('lineage')
    if any([(len(group) > 1) for group in groupby.groups.values()]):
        tmp_feature_lineage = []
        tmp_groups = []
        group_indices = list(range(len(groupby.groups)))
        for (lineage, feature_ids) in groupby.groups.items():
            tmp_feature_lineage.append(lineage)
            tmp_groups.append(list(feature_ids))
        self.__init_internal_taxonomy(pd.Series(data=tmp_feature_lineage, index=group_indices))
        ret = dict(zip(group_indices, tmp_groups))
    return self._merge_features_by_map(ret, True, **kwargs)
Merge features with duplicated taxonomy.

Parameters
----------
kwargs
    Compatibility
def merge_duplicated_features(self, **kwargs: Any) -> Optional[Mapper]:
    'Merge features with duplicated taxonomy.\n\n        Parameters\n        ----------\n        kwargs\n            Compatibility\n        '
    ret = {}
    groupby = self.__internal_taxonomy.groupby('lineage')
    if any([(len(group) > 1) for group in groupby.groups.values()]):
        tmp_feature_lineage = []
        tmp_groups = []
        group_indices = list(range(len(groupby.groups)))
        for (lineage, feature_ids) in groupby.groups.items():
            tmp_feature_lineage.append(lineage)
            tmp_groups.append(list(feature_ids))
        self.__init_internal_taxonomy(pd.Series(data=tmp_feature_lineage, index=group_indices))
        ret = dict(zip(group_indices, tmp_groups))
    return self._merge_features_by_map(ret, True, **kwargs)