private NodeCandidate moveNodeInSurplusGroup(NodeCandidate candidate, int[] countInGroup) {
        var currentGroup = candidate.allocation().get().membership().cluster().group();
        if (currentGroup.isEmpty()) return candidate;
        if (currentGroup.get().index() < requested.groups()) return candidate;
        return inFirstGroupWithDeficiency(candidate, countInGroup);
    }
Assign a group to new or to be reactivated nodes.
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/GroupAssigner.java