Remove this node from the list of children of its current parent,
        if the current parent is not ``None``, otherwise do nothing.

        .. versionadded:: 1.7.0

def remove(self):
        """
        Remove this node from the list of children of its current parent,
        if the current parent is not ``None``, otherwise do nothing.

        .. versionadded:: 1.7.0
        """
        if self.parent is not None:
            for i, child in enumerate(self.parent.children):
                if id(child) == id(self):
                    self.parent.remove_child(i)
                    self.parent = None
                    break