class_docstr: Unit tests for the :func:`~networkx.conductance` function.
class_docstr_tok: ["Unit","tests","for","the",":","func",":","`","~networkx.conductance","`","function","."]
code: def test_graph(self):
      G = nx.barbell_graph(5, 0)
      # Consider the singleton sets containing the "bridge" nodes.
      # There is only one cut edge, and each set has volume five.
      S = {4}
      T = {5}
      conductance = nx.conductance(G, S, T)
      expected = 1 / 5
      assert expected == conductance
      # Test with no input T
      G2 = nx.barbell_graph(3, 0)
      # There is only one cut edge, and each set has volume seven.
      S2 = {0, 1, 2}
      assert nx.conductance(G2, S2) == 1 / 7
  
imports: import networkx
label_desc: Use image node_id 1 for calling the TestConductance obj's underlying member method code with example usage: obj.test_graph() without return types