public Set<String> switchesOf(NodeList applicationNodes, NodeList allNodes) {
        assertTrue("All application nodes are children", applicationNodes.stream().allMatch(node -> node.parentHostname().isPresent()));
        Set<String> switches = new HashSet<>();
        for (var parent : allNodes.parentsOf(applicationNodes)) {
            Optional<String> switchHostname = parent.switchHostname();
            if (switchHostname.isEmpty()) continue;
            switches.add(switchHostname.get());
        }
        return switches;
    }
Returns the hosts from the input list which are not retired
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/ProvisioningTester.java