is_degree_sequence(out_deg,
in_deg=None)


Returns whether a list of degrees can be a degree sequence of some
graph.
Note that it is not required for the graph to be simple; in other
words, this function may return True for degree sequences
that can be realized using one or more multiple or loop edges only.
In particular, this function checks whether

all the degrees are nonnegative

for undirected graphs, the sum of degrees are even

for directed graphs, the two degree sequences are of the same length
and equal sums
 Parameters:
out_deg  the list of degrees. For directed graphs, this list must contain
the outdegrees of the vertices.
in_deg  the list of indegrees for directed graphs. This parameter must
be None for undirected graphs.
 Returns:
True if there exists some graph that can realize the
given degree sequence, False otherwise.@see: is_graphical_degree_sequence() if you do not
want to allow multiple or loop edges.
