def add_categories(self, new_categories, inplace=False):
        if not is_list_like(new_categories):
            new_categories = [new_categories]
        already_included = set(new_categories) & set(self._categories)
        if len(already_included) != 0:
            msg = ("new categories must not include old categories: %s" %
                   str(already_included))
            raise ValueError(msg)
        new_categories = list(self._categories) + list(new_categories)
        cat = self if inplace else self.copy()
        cat._categories = self._validate_categories(new_categories)
        cat._codes = _coerce_indexer_dtype(cat._codes, new_categories)
        if not inplace:
            return cat
Reads the binary representation of a tree and returns tuples of Tree items
dataset/ETHPy150Open pydata/pandas/pandas/core/categorical.py/Categorical.add_categories--crossover with--dataset/ETHPy150Open gitpython-developers/GitPython/git/objects/fun.py/tree_entries_from_data