code: func (m *BaseShardManager) getShardsForSentinelsLocked(
  	keys []string) map[int]*ShardMapping {
  
  	numShards := len(m.shardStates)
  	results := make(map[int]*ShardMapping)
  
  	for _, key := range keys {
  		shardId := m.getShardId(key, numShards)
  
  		entry, inMap := results[shardId]
  		if !inMap {
  			entry = &ShardMapping{}
  			if shardId != -1 {
  				state := m.shardStates[shardId]
  				if state.State == ActiveServer ||
  					state.State == WriteOnlyServer ||
  					state.State == WarmUpServer {
  
  					m.fillEntryWithConnection(state.Address, entry)
  
  					// During WARM_UP state, we do try to write sentinels to
  					// memcache but any failures are ignored. We run memcache
  					// server in this mode for sometime to prime our memcache
  					// and warm up memcache server.
  					if state.State == WarmUpServer {
  						entry.WarmingUp = true
  					}
  				} else {
  					connSkippedByAddr.Add(state.Address, 1)
  				}
  			}
  			entry.Keys = make([]string, 0, 1)
  			results[shardId] = entry
  		}
  		entry.Keys = append(entry.Keys, key)
  	}
  
  	return results
  }
docs: // This method assumes that m.rwMutex is locked.