def remove(self):
        if self.parent:
            for i, node in enumerate(self.parent.children):
                if node is self:
                    self.parent.changed()
                    del self.parent.children[i]
                    self.parent = None
                    return i
Call this method once you are done modifying the tree information.
dataset/ETHPy150Open ctxis/canape/CANAPE.Scripting/Lib/lib2to3/pytree.py/Base.remove--crossover with--dataset/ETHPy150Open gitpython-developers/GitPython/git/objects/tree.py/TreeModifier.set_done