private Group groupForThisIndex(int groupIndex) {
        return clusterInfo.getAllNodeInfos().stream()
                .map(NodeInfo::getGroup)
                .filter(Objects::nonNull)
                .filter(Group::isLeafGroup)
                .filter(group -> group.getIndex() == groupIndex)
                .findFirst()
                .orElseThrow();
    }
We want to check with the distributors to verify that it is safe to take down the storage node.
@param node the node to be checked
@param clusterStateVersion the cluster state we expect distributors to have
clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeStateChangeChecker.java