docs: boolean initializePartitionAssignments(Set<Member> excludedMembers) {
          if (!isPartitionAssignmentAllowed()) {
              return false;
          }
  
          Collection<MemberGroup> memberGroups = createMemberGroups(excludedMembers);
          if (memberGroups.isEmpty()) {
              logger.warning("No member group is available to assign partition ownership...");
              return false;
          }
  
          logger.info("Initializing cluster partition table arrangement...");
          PartitionReplica[][] newState = partitionStateGenerator.arrange(memberGroups, partitions);
          if (newState.length != partitionCount) {
              throw new HazelcastException("Invalid partition count! "
                      + "Expected: " + partitionCount + ", Actual: " + newState.length);
          }
  
          // increment state version to make fail cluster state transaction
          // if it's started and not locked the state yet.
          stateVersion.incrementAndGet();
          ClusterState clusterState = node.getClusterService().getClusterState();
          if (!clusterState.isMigrationAllowed()) {
              // cluster state is either changed or locked, decrement version back and fail.
              stateVersion.decrementAndGet();
              logger.warning("Partitions can't be assigned since cluster-state= " + clusterState);
              return false;
          }
  
          for (int partitionId = 0; partitionId < partitionCount; partitionId++) {
              InternalPartitionImpl partition = partitions[partitionId];
              PartitionReplica[] replicas = newState[partitionId];
              partition.setReplicas(replicas);
          }
          setInitialized();
          return true;
      }