public NodeList parentsOf(NodeList children) {
        return children.stream()
                       .map(this::parentOf)
                       .flatMap(Optional::stream)
                       .collect(collectingAndThen(Collectors.toList(), NodeList::copyOf));
    }
Returns the parent nodes of the given child nodes
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeList.java