class_docstr: Unit tests for the :func:`~networkx.graph_atlas_g` function.
class_docstr_tok: ["Unit","tests","for","the",":","func",":","`","~networkx.graph_atlas_g","`","function","."]
code: def test_nondecreasing_degree_sequence(self):
      # Check for lexicographically nondecreasing degree sequences
      # (for fixed number of nodes and edges).
      #
      # There are three exceptions to this rule in the order given in
      # the "Atlas of Graphs" book, so we need to manually exclude
      # those.
      exceptions = [
          ("G55", "G56"),
          ("G1007", "G1008"),
          ("G1012", "G1013"),
      ]
      for n, group in groupby(self.GAG, key=nx.number_of_nodes):
          for m, group in groupby(group, key=nx.number_of_edges):
              for G1, G2 in pairwise(group):
                  if (G1.name, G2.name) in exceptions:
                      continue
                  d1 = sorted(d for v, d in G1.degree())
                  d2 = sorted(d for v, d in G2.degree())
                  assert d1 <= d2
  
file_path: networkx/networkx/generators/tests/test_atlas.py
imports: from itertools import groupby
  import pytest
  import networkx
  from networkx import graph_atlas, graph_atlas_g
  from networkx.generators.atlas import NUM_GRAPHS
  from networkx.utils import edges_equal, nodes_equal, pairwise
label_desc: Use image node_id 6 for calling the TestAtlasGraphG obj's underlying member method code with example usage: obj.test_nondecreasing_degree_sequence() without return types