class_docstr: Unit tests for the :func:`~networkx.node_expansion` function.
class_docstr_tok: ["Unit","tests","for","the",":","func",":","`","~networkx.node_expansion","`","function","."]
code: def test_graph(self):
      G = nx.path_graph(8)
      S = {3, 4, 5}
      expansion = nx.node_expansion(G, S)
      # The neighborhood of S has cardinality five, and S has
      # cardinality three.
      expected = 5 / 3
      assert expected == expansion
  
imports: import networkx
label_desc: Use image node_id 1 for calling the TestNodeExpansion obj's underlying member method code with example usage: obj.test_graph() without return types