def directed_configuration_model(in_degree_sequence, out_degree_sequence, create_using=None, seed=None):
 if (sum(in_degree_sequence) != sum(out_degree_sequence)):
  msg = 'Invalid degree sequences: sequences must have equal sums'
  raise nx.NetworkXError(msg)
 if (create_using is None):
  create_using = nx.MultiDiGraph()
 G = _configuration_model(out_degree_sequence, create_using, directed=True, in_deg_sequence=in_degree_sequence, seed=seed)
 name = 'directed configuration_model {} nodes {} edges'
 G.name = name.format(len(G), G.size())
 return G

def directed_configuration_model ( in_degree_sequence , out_degree_sequence , create_using = None , seed = None ) : if ( sum ( in_degree_sequence ) != sum ( out_degree_sequence ) ) : msg = 'Invalid degree sequences: sequences must have equal sums' raise nx . NetworkXError ( msg ) if ( create_using is None ) : create_using = nx . MultiDiGraph ( ) G = _configuration_model ( out_degree_sequence , create_using , directed = True , in_deg_sequence = in_degree_sequence , seed = seed ) name = 'directed configuration_model {} nodes {} edges' G . name = name . format ( len ( G ) , G . size ( ) ) return G
return a directed_random graph with the given degree sequences .