code: def test_is_empty():
      graphs = [
          nx.Graph(),
          nx.DiGraph(),
          nx.MultiGraph(),
          nx.MultiDiGraph(),
      ]
      for G in graphs:
          assert nx.is_empty(G)
          G.add_nodes_from(range(5))
          assert nx.is_empty(G)
          G.add_edges_from([(1, 2), (3, 4)])
          assert not nx.is_empty(G)
  
imports: import random
  import pytest
  import networkx
  from networkx.utils import edges_equal, nodes_equal
label_desc: Use image node_id 9 for calling a global function with example usage: test_is_empty() without return types