code: def get_shard_by_key(self, key):
          
          key_id = self._get_key_id_from_key(key)
          return self.get_shard_by_key_id(key_id)
docs: get_shard_by_key returns the Redis shard given a key.
          Keyword arguments:
          key -- the key (e.g. 'friend_request:{12345}')
  
          If the key contains curly braces as in the example, then portion inside
          the curly braces will be used as the key id. Otherwise, the entire key
          is the key id.
          returns a redis.StrictRedis connection