code: private Set<Integer> perNodeRelease(final C thisNodeAddress, final C[] currentState, final int nodeCount, final int nodeRank) {
          final int numberIShouldHave = howManyShouldIHave(totalNumShards, nodeCount, minNodes, nodeRank);
  
          // destinationsAcquired reflects what we already have according to the currentState
          final List<Integer> destinationsAcquired = buildDestinationsAcquired(thisNodeAddress, currentState);
  
          final int numHad = destinationsAcquired.size();
          final Set<Integer> ret = new HashSet<>();
          if (destinationsAcquired.size() > numberIShouldHave) { // there's some to remove.
              final Random random = new Random();
  
              while (destinationsAcquired.size() > numberIShouldHave) {
                  final int index = random.nextInt(destinationsAcquired.size());
                  ret.add(destinationsAcquired.remove(index));
              }
          }
  
          if (LOGGER.isTraceEnabled() && ret.size() > 0)
              LOGGER.trace(thisNodeAddress.toString() + " removing shards " + ret + " because I have " +
                      numHad + " but shouldn't have more than " + numberIShouldHave + ".");
  
          return ret;
      }
docs: go through and determine which nodes to give up ... if any