code: public TokenMetadata cloneAfterAllLeft()
      {
          lock.readLock().lock();
          try
          {
              TokenMetadata allLeftMetadata = cloneOnlyTokenMap();
  
              for (InetAddress endpoint : leavingEndpoints)
                  allLeftMetadata.removeEndpoint(endpoint);
  
              return allLeftMetadata;
          }
          finally
          {
              lock.readLock().unlock();
          }
      }
docs: Create a copy of TokenMetadata with tokenToEndpointMap reflecting situation after all
  current leave operations have finished.
  
  @return new token metadata