def _init_redis_shards(self):
        """
        init_redis_shards is used internally to connect to the Redis sentinels
        and populate self.shards with the redis.StrictRedis instances. This
        is a convenient method to override / stub out in unit tests.
        """
        self._shards = {}
        if self._sentinels is not None:
            self.init_shards_from_sentinel()
        elif self._masters is not None:
            self.init_shards_from_masters()
        else:
            raise Exception("You must either specify sentinels or masters")