code: def remove_from_parent(self):
          
          parent = self.parent
          if parent is not None:
              try:
                  children = parent.children
              except AttributeError: pass
              else:
                  remove_upto_once(children, self)
docs: Removes this node from the parent's ``children`` collection if it exists.