class_docstr: Unit tests for the :func:`~networkx.mixing_expansion` function.
class_docstr_tok: ["Unit","tests","for","the",":","func",":","`","~networkx.mixing_expansion","`","function","."]
code: def test_graph(self):
      G = nx.barbell_graph(5, 0)
      S = set(range(5))
      T = set(G) - S
      expansion = nx.mixing_expansion(G, S, T)
      # There is one cut edge, and the total number of edges in the
      # graph is twice the total number of edges in a clique of size
      # five, plus one more for the bridge.
      expected = 1 / (2 * (5 * 4 + 1))
      assert expected == expansion
  
imports: import networkx
label_desc: Use image node_id 1 for calling the TestMixingExpansion obj's underlying member method code with example usage: obj.test_graph() without return types