def METHOD_NAME(self):
    edges = {
        'r': ['a', 'd'],
        'a': ['b'],
        'b': ['c'],
        'c': ['a', 'd', 'g'],
        'd': ['e'],
        'e': ['f'],
        'f': ['a', 'd', 'g']
    }
    expected_dominators = {
        'r': None,
        'a': 'r',
        'b': 'a',
        'c': 'b',
        'd': 'r',
        'e': 'd',
        'f': 'e',
        'g': 'r'
    }
    self.graph.entry = 'r'
    self.graph.edges = edges
    self.graph.nodes = list(expected_dominators.keys())
    self.assertEqual(expected_dominators, self.graph.immediate_dominators())