@classmethod
    def connection_pool(cls, **kwargs):
        pool_key = cls.key_for_kwargs(kwargs)
        if cls.pools in pool_key:
            return cls.pools[pool_key]

        location = kwargs.get('location', None)
        if not location:
            raise ImproperlyConfigured("no `location` key on connection kwargs")

        params = {
            'connection_class': Connection,
            'db': kwargs.get('db', 0),
            'password': kwargs.get('password', None),
        }

        if location.startswith("unix:"):
            params['connection_class'] = UnixDomainSocketConnection
            params['path'] = location[5:]
        else:
            try:
                params['host'], params['port'] = location.split(":")
                params['port'] = int(params['port'])

            except ValueError:
                raise ImproperlyConfigured("Invalid `location` key syntax on connection kwargs")

        cls.pools[pool_key] = RedisConnectionPool(**params)
        return cls.pools[pool_key]
dataset/ETHPy150Open niwinz/django-sse/django_sse/redisqueue.py/ConnectionPoolManager.connection_pool/swapped operands of `in`