code: def test_irreducible2(self):
      # Graph taken from Figure 4 of
      # K. D. Cooper, T. J. Harvey, and K. Kennedy.
      # A simple, fast dominance algorithm.
      # Software Practice & Experience, 4:110, 2001.
      edges = [
          (1, 2),
          (2, 1),
          (2, 3),
          (3, 2),
          (4, 2),
          (4, 3),
          (5, 1),
          (6, 4),
          (6, 5),
      ]
      G = nx.DiGraph(edges)
      result = nx.immediate_dominators(G, 6)
      assert result == {i: 6 for i in range(1, 7)}
  
imports: import pytest
  import networkx
label_desc: Use image node_id 7 for calling the TestImmediateDominators obj's underlying member method code with example usage: obj.test_irreducible2() without return types