private static Optional<Element> findParentByTag(String tag, Element element) {
        Node parent = element.getParentNode();
        if (parent == null) return Optional.empty();
        if ( ! (parent instanceof Element parentElement)) return Optional.empty();
        if (parentElement.getTagName().equals(tag)) return Optional.of(parentElement);
        return findParentByTag(tag, parentElement);
    }
Returns the ID of the container element referencing nodesElement, if any
config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/NodesSpecification.java