# Path: aredis/exceptions.py
# class ClusterDownError(ClusterError, ResponseError):
# 
#     def __init__(self, resp):
#         self.args = (resp,)
#         self.message = resp
# 
# class RedisClusterException(Exception):
#     pass


import sys
from functools import wraps
from aredis.exceptions import (ClusterDownError, RedisClusterException)
    from aredis.speedups import crc16, hash_slot


_C_EXTENSION_SPEEDUP = False
try:

    _C_EXTENSION_SPEEDUP = True
except Exception:
    pass

LOOP_DEPRECATED = sys.version_info >= (3, 8)


def b(x):
    return x.encode('latin-1') if not isinstance(x, bytes) else x


def nativestr(x):
    return x if isinstance(x, str) else x.decode('utf-8', 'replace')


def iteritems(x):
    return iter(x.items())


def iterkeys(x):
    return iter(x.keys())



# Path: aredis/exceptions.py
# class ClusterDownError(ClusterError, ResponseError):
# 
#     def __init__(self, resp):
#         self.args = (resp,)
#         self.message = resp
# 
# class RedisClusterException(Exception):
#     pass


# Path: aredis/utils.py
import sys
from functools import wraps
from aredis.exceptions import (ClusterDownError, RedisClusterException)
    from aredis.speedups import crc16, hash_slot



_C_EXTENSION_SPEEDUP = False
try:

    _C_EXTENSION_SPEEDUP = True
except Exception:
    pass

LOOP_DEPRECATED = sys.version_info >= (3, 8)


def b(x):
    return x.encode('latin-1') if not isinstance(x, bytes) else x


def nativestr(x):
    return x if isinstance(x, str) else x.decode('utf-8', 'replace')


def iteritems(x):
    return iter(x.items())


def iterkeys(x):
    return iter(x.keys())



def itervalues(x):