# 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
        raise ValueError('Value should be of dict type')

    result = set([])

    for _, v in res.items():
        for value in v:
            result.add(value)

    return list(result)


def first_key(res):
    """
    Returns the first result for the given command.

    If more then 1 result is returned then a `RedisClusterException` is raised.
    """
    if not isinstance(res, dict):
        raise ValueError('Value should be of dict type')

    if len(res.keys()) != 1:
        raise RedisClusterException("More then 1 result from command")

    return list(res.values())[0]


def blocked_command(self, command):
    """
    Raises a `RedisClusterException` mentioning the command is blocked.
    """

# 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

        raise ValueError('Value should be of dict type')

    result = set([])

    for _, v in res.items():
        for value in v:
            result.add(value)

    return list(result)


def first_key(res):
    """
    Returns the first result for the given command.

    If more then 1 result is returned then a `RedisClusterException` is raised.
    """
    if not isinstance(res, dict):
        raise ValueError('Value should be of dict type')

    if len(res.keys()) != 1:
        raise RedisClusterException("More then 1 result from command")

    return list(res.values())[0]


def blocked_command(self, command):
    """
    Raises a `RedisClusterException` mentioning the command is blocked.
    """

    raise RedisClusterException("Command: {0} is blocked in redis cluster mode".format(command))