public static List<Group> enumerateFrom(Group root) {
        List<Group> leaves = new ArrayList<>();
        visitNode(root, leaves);
        return leaves;
    }
Return a list of all groups that do not themselves have any child groups,
i.e. only the groups that contain nodes.

The output order is not defined.
clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/LeafGroups.java