def _remove_identity_node(graph, node):
 (portinputs, portoutputs) = _node_ports(graph, node)
 for (field, connections) in list(portoutputs.items()):
  if portinputs:
   _propagate_internal_output(graph, node, field, connections, portinputs)
  else:
   _propagate_root_output(graph, node, field, connections)
 graph.remove_nodes_from([node])
 logger.debug((u'Removed the identity node %s from the graph.' % node))

def _remove_identity_node ( graph , node ) : ( portinputs , portoutputs ) = _node_ports ( graph , node ) for ( field , connections ) in list ( portoutputs . items ( ) ) : if portinputs : _propagate_internal_output ( graph , node , field , connections , portinputs ) else : _propagate_root_output ( graph , node , field , connections ) graph . remove_nodes_from ( [ node ] ) logger . debug ( ( u'Removed the identity node %s from the graph.' % node ) )
remove identity nodes from an execution graph .