private static boolean violatesParentHostPolicy(Node node, Node host, Map<Node, List<Allocation>> containedAllocations) {
        if (node.allocation().isEmpty()) return false;
        Allocation nodeAllocation = node.allocation().get();

        if (host.reservedTo()
                .filter(tenantName -> !tenantName.equals(nodeAllocation.owner().tenant()))
                .isPresent()) {
            return true;
        }

        for (var allocation : containedAllocations.get(host)) {
            if (allocation.membership().cluster().satisfies(nodeAllocation.membership().cluster())
                    && allocation.owner().equals(nodeAllocation.owner())) {
                return true;
            }
        }
        return false;
    }
Returns the parent to which the node was allocated, if it was successfully allocated.
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/CapacityChecker.java