parameters: (sgv0, sgv1, mode)
return_statement: return sgv0, sgv1
docstring: Re-route all the inputs of two subgraphs.
  
    Args:
      sgv0: the first subgraph to have its inputs swapped. This argument is
        converted to a subgraph using the same rules than the function
        subgraph.make_view.
      sgv1: the second subgraph to have its inputs swapped. This argument is
        converted to a subgraph using the same rules than the function
        subgraph.make_view.
      mode: reroute mode, see _reroute_ts(...).
    Returns:
      Two new subgraph views with their inputs swapped.
        Note that sgv0 and sgv1 are also modified in place.
    Raises:
      StandardError: if sgv0 or sgv1 cannot be converted to a SubGraphView using
        the same rules than the function subgraph.make_view.
docstring_summary: Re-route all the inputs of two subgraphs.
docstring_tokens: Re - route all the inputs of two subgraphs .
function: def _reroute_sgv_inputs(sgv0, sgv1, mode):
    """Re-route all the inputs of two subgraphs.
  
    Args:
      sgv0: the first subgraph to have its inputs swapped. This argument is
        converted to a subgraph using the same rules than the function
        subgraph.make_view.
      sgv1: the second subgraph to have its inputs swapped. This argument is
        converted to a subgraph using the same rules than the function
        subgraph.make_view.
      mode: reroute mode, see _reroute_ts(...).
    Returns:
      Two new subgraph views with their inputs swapped.
        Note that sgv0 and sgv1 are also modified in place.
    Raises:
      StandardError: if sgv0 or sgv1 cannot be converted to a SubGraphView using
        the same rules than the function subgraph.make_view.
    """
    sgv0 = subgraph.make_view(sgv0)
    sgv1 = subgraph.make_view(sgv1)
    util.check_graphs(sgv0, sgv1)
    can_modify = sgv0.ops + sgv1.ops
    # also allow consumers of passthrough to be modified:
    can_modify += util.get_consuming_ops(sgv0.passthroughs)
    can_modify += util.get_consuming_ops(sgv1.passthroughs)
    _reroute_ts(sgv0.inputs, sgv1.inputs, mode, can_modify=can_modify)
    _reroute_sgv_remap(sgv0, sgv1, mode)
    return sgv0, sgv1
function_tokens: def _reroute_sgv_inputs ( sgv0 , sgv1 , mode ) : sgv0 = subgraph . make_view ( sgv0 ) sgv1 = subgraph . make_view ( sgv1 ) util . check_graphs ( sgv0 , sgv1 ) can_modify = sgv0 . ops + sgv1 . ops # also allow consumers of passthrough to be modified: can_modify += util . get_consuming_ops ( sgv0 . passthroughs ) can_modify += util . get_consuming_ops ( sgv1 . passthroughs ) _reroute_ts ( sgv0 . inputs , sgv1 . inputs , mode , can_modify = can_modify ) _reroute_sgv_remap ( sgv0 , sgv1 , mode ) return sgv0 , sgv1