def in2out(*local_opts, **kwargs):
 name = (kwargs and kwargs.pop('name', None))
 if (len(local_opts) > 1):
  local_opts = LocalOptGroup(*local_opts)
 else:
  (local_opts,) = local_opts
  if (not name):
   name = local_opts.__name__
 ret = TopoOptimizer(local_opts, order='in_to_out', failure_callback=TopoOptimizer.warn_inplace, **kwargs)
 if name:
  ret.__name__ = name
 return ret

def in2out ( * local_opts , ** kwargs ) : name = ( kwargs and kwargs . pop ( 'name' , None ) ) if ( len ( local_opts ) > 1 ) : local_opts = LocalOptGroup ( * local_opts ) else : ( local_opts , ) = local_opts if ( not name ) : name = local_opts . __name__ ret = TopoOptimizer ( local_opts , order = 'in_to_out' , failure_callback = TopoOptimizer . warn_inplace , ** kwargs ) if name : ret . __name__ = name return ret
uses the topooptimizer from the input nodes to output nodes of the graph .