@compatibility(is_backward_compatible=True)
def prepend(self, x: 'Node') -> None:
    '\n        Insert x before this node in the list of nodes in the graph. Example::\n\n            Before: p -> self\n                    bx -> x -> ax\n            After:  p -> x -> self\n                    bx -> ax\n\n        Args:\n            x (Node): The node to put before this node. Must be a member of the same graph.\n        '
    assert (self.graph == x.graph), 'Attempting to move a Node into a different Graph'
    x._remove_from_list()
    p = self._prev
    (p._next, x._prev) = (x, p)
    (x._next, self._prev) = (self, x)
Insert x before this node in the list of nodes in the graph. Example::

    Before: p -> self
            bx -> x -> ax
    After:  p -> x -> self
            bx -> ax

Args:
    x (Node): The node to put before this node. Must be a member of the same graph.
@compatibility(is_backward_compatible=True)
def prepend(self, x: 'Node') -> None:
    '\n        Insert x before this node in the list of nodes in the graph. Example::\n\n            Before: p -> self\n                    bx -> x -> ax\n            After:  p -> x -> self\n                    bx -> ax\n\n        Args:\n            x (Node): The node to put before this node. Must be a member of the same graph.\n        '
    assert (self.graph == x.graph), 'Attempting to move a Node into a different Graph'
    x._remove_from_list()
    p = self._prev
    (p._next, x._prev) = (x, p)
    (x._next, self._prev) = (self, x)