code: def test_valid_degree_sequence2():
      n = 100
      for i in range(10):
          G = nx.barabasi_albert_graph(n, 1)
          deg = (d for n, d in G.degree())
          assert nx.is_graphical(deg, method="eg")
          assert nx.is_graphical(deg, method="hh")
  
file_path: networkx/networkx/algorithms/tests/test_graphical.py
imports: import pytest
  import networkx
label_desc: Use image node_id 2 for calling a global function with example usage: test_valid_degree_sequence2() without return types