def triad_graph(triad_name):
 if (triad_name not in TRIAD_EDGES):
  raise ValueError('unknown triad name "{}"; use one of the triad names in the TRIAD_NAMES constant'.format(triad_name))
 G = DiGraph()
 G.add_nodes_from('abc')
 G.add_edges_from(TRIAD_EDGES[triad_name])
 return G

def triad_graph ( triad_name ) : if ( triad_name not in TRIAD_EDGES ) : raise ValueError ( 'unknown triad name "{}"; use one of the triad names in the TRIAD_NAMES constant' . format ( triad_name ) ) G = DiGraph ( ) G . add_nodes_from ( 'abc' ) G . add_edges_from ( TRIAD_EDGES [ triad_name ] ) return G
returns the triad graph with the given name .