def METHOD_NAME(self, root):
    rank = 0.0
    dominated = set()
    visited = set()
    def visit(node):
        nonlocal rank
        nonlocal dominated
        if node in visited or node not in self.leaked_set:
            return
        visited.add(node)
        if self.counts[node] == 1:
            dominated.add(node)
        if node.type == ReachableObjectType.METHOD:
            rank += 1.0 / self.counts[node]
        for succ in node.succs:
            visit(succ)
    for succ in root.succs:
        visit(succ)
    return (rank, dominated)