@compatibility(is_backward_compatible=True)
def replace_input_with(self, old_input: 'Node', new_input: 'Node'):
    '\n        Loop through input nodes of ``self``, and replace all instances of\n        ``old_input`` with ``new_input``.\n\n        Args:\n\n            old_input (Node): The old input node to be replaced.\n            new_input (Node): The new input node to replace ``old_input``.\n        '

    def maybe_replace_node(n: Node) -> Node:
        return (new_input if (n == old_input) else n)
    new_args = map_arg(self.args, maybe_replace_node)
    new_kwargs = map_arg(self.kwargs, maybe_replace_node)
    assert isinstance(new_args, tuple)
    assert isinstance(new_kwargs, dict)
    self.__update_args_kwargs(new_args, new_kwargs)
Loop through input nodes of ``self``, and replace all instances of
``old_input`` with ``new_input``.

Args:

    old_input (Node): The old input node to be replaced.
    new_input (Node): The new input node to replace ``old_input``.
@compatibility(is_backward_compatible=True)
def replace_input_with(self, old_input: 'Node', new_input: 'Node'):
    '\n        Loop through input nodes of ``self``, and replace all instances of\n        ``old_input`` with ``new_input``.\n\n        Args:\n\n            old_input (Node): The old input node to be replaced.\n            new_input (Node): The new input node to replace ``old_input``.\n        '

    def maybe_replace_node(n: Node) -> Node:
        return (new_input if (n == old_input) else n)
    new_args = map_arg(self.args, maybe_replace_node)
    new_kwargs = map_arg(self.kwargs, maybe_replace_node)
    assert isinstance(new_args, tuple)
    assert isinstance(new_kwargs, dict)
    self.__update_args_kwargs(new_args, new_kwargs)