def remove(self) -> None:
    if (self.parent is None):
        return
    assert (self in self.parent._children)
    self.parent._children.remove(self)
    self.parent = None
def remove(self) -> None:
    if (self.parent is None):
        return
    assert (self in self.parent._children)
    self.parent._children.remove(self)
    self.parent = None