def connect(self, url: str) -> RedisCluster:
        """Given a connection url, return a client instance.
        Prefer to return from our cache but if we don't yet have one build it
        to populate the cache.
        """
        if url not in self._clients:
            with self._clients_lock:
                if url not in self._clients:
                    params = self.make_connection_params(url)
                    self._clients[url] = self.get_connection(params)

        return self._clients[url]  # type: ignore[no-any-return]
Given a connection url, return a client instance.
        Prefer to return from our cache but if we don't yet have one build it
        to populate the cache.
        
api/core/redis_cluster.py