def _create_dot_graph(graph, show_connectinfo=False, simple_form=True):
 logger.debug(u'creating dot graph')
 pklgraph = nx.DiGraph()
 for edge in graph.edges():
  data = graph.get_edge_data(*edge)
  srcname = get_print_name(edge[0], simple_form=simple_form)
  destname = get_print_name(edge[1], simple_form=simple_form)
  if show_connectinfo:
   pklgraph.add_edge(srcname, destname, l=str(data[u'connect']))
  else:
   pklgraph.add_edge(srcname, destname)
 return pklgraph

def _create_dot_graph ( graph , show_connectinfo = False , simple_form = True ) : logger . debug ( u'creating dot graph' ) pklgraph = nx . DiGraph ( ) for edge in graph . edges ( ) : data = graph . get_edge_data ( * edge ) srcname = get_print_name ( edge [ 0 ] , simple_form = simple_form ) destname = get_print_name ( edge [ 1 ] , simple_form = simple_form ) if show_connectinfo : pklgraph . add_edge ( srcname , destname , l = str ( data [ u'connect' ] ) ) else : pklgraph . add_edge ( srcname , destname ) return pklgraph
create a graph that can be pickled .