def get_connection(self, connection_params: dict) -> RedisCluster:  # type: ignore[type-arg]
        """
        Given connection_params, return a new client instance.
        Basic django-redis ConnectionFactory manages a cache of connection
        pools and builds a fresh client each time. because the cluster client
        manages its own connection pools, we will instead merge the
        "connection" and "client" kwargs and throw them all at the client to
        sort out.
        If we find conflicting client and connection kwargs, we'll raise an
        error.
        """
        try:
            client_cls_kwargs = deepcopy(self.redis_client_cls_kwargs)
            # ... and smash 'em together (crashing if there's conflicts)...
            for key, value in connection_params.items():
                if key in client_cls_kwargs:
                    raise ImproperlyConfigured(
                        f"Found '{key}' in both the connection and the client kwargs"
                    )
                client_cls_kwargs[key] = value

            # Add explicit socket timeout
            client_cls_kwargs["socket_timeout"] = SOCKET_TIMEOUT
            client_cls_kwargs["socket_keepalive"] = True
            # ... and then build and return the client
            return RedisCluster(**client_cls_kwargs)  # type: ignore[abstract]
        except Exception as e:
            # Let django redis handle the exception
            raise ConnectionInterrupted(connection=None) from e

        Given connection_params, return a new client instance.
        Basic django-redis ConnectionFactory manages a cache of connection
        pools and builds a fresh client each time. because the cluster client
        manages its own connection pools, we will instead merge the
        "connection" and "client" kwargs and throw them all at the client to
        sort out.
        If we find conflicting client and connection kwargs, we'll raise an
        error.
        
api/core/redis_cluster.py