'imdom(X) -> idset
Return the immediate dominators of a set of objects X. The immediate
dominators is a subset of the referrers. It includes only those
referrers that are reachable directly, avoiding any other referrer.'

def imdom(self, X):

    pred = self.nodeset_adapt(self.referrers(X))
    visit = self.hv.reachable_x(self.immnodeset([self.root]), pred)
    return self.retset((pred & visit))
