code: def test_random_graphs():
      """Generate 5 random graphs of different types and sizes and
      make sure that all sets are independent and maximal."""
      for i in range(0, 50, 10):
          G = nx.erdos_renyi_graph(i * 10 + 1, random.random())
          IS = nx.maximal_independent_set(G)
          assert G.subgraph(IS).number_of_edges() == 0
          nbrs_of_MIS = set.union(*(set(G.neighbors(v)) for v in IS))
          assert all(
              v in nbrs_of_MIS for v in set(G.nodes()).difference(IS)
          )
  
file_path: networkx/networkx/algorithms/tests/test_mis.py
imports: import random
  import pytest
  import networkx
label_desc: Use image node_id 6 for calling a global function with example usage: test_random_graphs() without return types