private void getAllDescendantsImpl(NodeType node, List<NodeType> result, Set<NodeType> visited) {
        if (!childrenOfNode.containsKey(node)) return;
        if (visited.contains(node)) return;

        visited.add(node);

        result.add(node);

        for (NodeType childNode : getValidChildren(node)) {
            getAllDescendantsImpl(childNode, result, visited);
        }

    }
Recursive search downwards through the inheritance graph to 
retrieve all who directly or indirectly inherits the given node
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/index/InheritanceGraph.java