public PortRange partition(int partitionIndex, int numberOfPartitions) {
    int partitionLowerBound = partitionLowerBound(partitionIndex, numberOfPartitions);
    int partitionUpperBound = partitionLowerBound(partitionIndex + 1, numberOfPartitions) - 1;
    return new PortRange(partitionLowerBound, partitionUpperBound);
  }
Partition this port range into a number of sub-ranges and return the selected sub-range.
The partitions are such that sizes of the largest and smallest differ by no more than 1.
build-tools/geode-testing-isolation/src/main/java/org/apache/geode/gradle/testing/isolation/PortRange.java