code: public void updateNormalTokens(Multimap<InetAddress, Token> endpointTokens)
      {
          if (endpointTokens.isEmpty())
              return;
  
          lock.writeLock().lock();
          try
          {
              boolean shouldSortTokens = false;
              for (InetAddress endpoint : endpointTokens.keySet())
              {
                  Collection<Token> tokens = endpointTokens.get(endpoint);
  
                  assert tokens != null && !tokens.isEmpty();
  
                  bootstrapTokens.removeValue(endpoint);
                  tokenToEndpointMap.removeValue(endpoint);
                  topology.addEndpoint(endpoint);
                  leavingEndpoints.remove(endpoint);
                  removeFromMoving(endpoint); // also removing this endpoint from moving
  
                  for (Token token : tokens)
                  {
                      InetAddress prev = tokenToEndpointMap.put(token, endpoint);
                      if (!endpoint.equals(prev))
                      {
                          if (prev != null)
                              logger.warn("Token {} changing ownership from {} to {}", token, prev, endpoint);
                          shouldSortTokens = true;
                      }
                  }
              }
  
              if (shouldSortTokens)
                  sortedTokens = sortTokens();
          }
          finally
          {
              lock.writeLock().unlock();
          }
      }
docs: Update token map with a set of token/endpoint pairs in normal state.
  
  Prefer this whenever there are multiple pairs to update, as each update (whether a single or multiple)
  is expensive (CASSANDRA-3831).
  
  @param endpointTokens