class_docstr: Unit tests for the :func:`~networkx.configuration_model`
  function.
class_docstr_tok: ["Unit","tests","for","the",":","func",":","`","~networkx.configuration_model","`","function","."]
docstr: Tests that the degree sequence of the generated graph matches
  the input degree sequence.
docstr_tok: ["Tests","that","the","degree","sequence","of","the","generated","graph","matches","the","input","degree","sequence","."]
code: def test_degree_sequence(self):
      """Tests that the degree sequence of the generated graph matches
      the input degree sequence.
  
      """
      deg_seq = [5, 3, 3, 3, 3, 2, 2, 2, 1, 1, 1]
      G = nx.configuration_model(deg_seq, seed=12345678)
      assert sorted((d for n, d in G.degree()), reverse=True) == [
          5,
          3,
          3,
          3,
          3,
          2,
          2,
          2,
          1,
          1,
          1,
      ]
      assert sorted(
          (d for n, d in G.degree(range(len(deg_seq)))), reverse=True
      ) == [
          5,
          3,
          3,
          3,
          3,
          2,
          2,
          2,
          1,
          1,
          1,
      ]
  
imports: import pytest
  import networkx
label_desc: Use image node_id 3 for calling the TestConfigurationModel obj's underlying member method code with example usage: obj.test_degree_sequence() without return types