pub fn ancestors(&self, node: &PackageNode) -> HashSet<&PackageNode> {
        // If node is a root dep, then *every* package is an ancestor of this one
        let mut dependents = if self.root_internal_dependencies().contains(node) {
            return self.graph.node_weights().collect();
        } else {
            turborepo_graph_utils::transitive_closure(
                &self.graph,
                self.node_lookup.get(node).cloned(),
                petgraph::Direction::Incoming,
            )
        };
        dependents.remove(node);
        dependents
    }
For a given package in the repo, returns the set of packages
that depend on this one, excluding those that are unresolved.

Example:

a -> b -> c (external)

ancestors(c) = {a, b}
crates/turborepo-repository/src/package_graph/mod.rs