#NEWLINE# def _replicate_graph_with_names( compilation ) : #NEWLINE# #INDENT# g = compilation . execution_graph #NEWLINE# n_g = g . __class__ ( name = g . name ) #NEWLINE# for ( node , node_data ) in g . nodes_iter ( data = True ) : #NEWLINE# #INDENT# n_g . add_node ( node . name , attr_dict = node_data ) #NEWLINE# #UNINDENT# for ( u , v , u_v_data ) in g . edges_iter ( data = True ) : #NEWLINE# #INDENT# n_g . add_edge ( u . name , v . name , attr_dict = u_v_data ) #NEWLINE# #UNINDENT# return n_g