def METHOD_NAME(self, item):
    # The root may be installed or uninstalled.
    if item.depth == 0:
        return True
    # Early exit after we've seen an uninstalled dep.
    if self.has_uninstalled_deps:
        return False
    spec = item.edge.spec
    if not spec.external and not spec.installed:
        self.has_uninstalled_deps = True
        return False
    return True