# Path: aredis/utils.py
# def dict_merge(*dicts):
#     merged = {}
#     for d in dicts:
#         merged.update(d)
#     return merged
# 
# def nativestr(x):
#     return x if isinstance(x, str) else x.decode('utf-8', 'replace')
# 
# def list_keys_to_dict(key_list, callback):
#     return dict.fromkeys(key_list, callback)
# 
# class NodeFlag:
#     BLOCKED = 'blocked'
#     ALL_NODES = 'all-nodes'
#     ALL_MASTERS = 'all-masters'
#     RANDOM = 'random'
#     SLOT_ID = 'slot-id'
# 
# def bool_ok(response):
#     return nativestr(response) == 'OK'


import warnings
from aredis.utils import (dict_merge, nativestr,
                          list_keys_to_dict,
                          NodeFlag, bool_ok)
        """Returns a dictionary containing the specified masters state."""
        return await self.execute_command('SENTINEL MASTER', service_name)

    async def sentinel_masters(self):
        """Returns a list of dictionaries containing each master's state."""
        return await self.execute_command('SENTINEL MASTERS')

    async def sentinel_monitor(self, name, ip, port, quorum):
        """Adds a new master to Sentinel to be monitored"""
        return await self.execute_command('SENTINEL MONITOR', name, ip, port, quorum)

    async def sentinel_remove(self, name):
        """Removes a master from Sentinel's monitoring"""
        return await self.execute_command('SENTINEL REMOVE', name)

    async def sentinel_sentinels(self, service_name):
        """Returns a list of sentinels for ``service_name``"""
        return await self.execute_command('SENTINEL SENTINELS', service_name)

    async def sentinel_set(self, name, option, value):
        """Sets Sentinel monitoring parameters for a given master"""
        return await self.execute_command('SENTINEL SET', name, option, value)

    async def sentinel_slaves(self, service_name):
        """Returns a list of slaves for ``service_name``"""
        return await self.execute_command('SENTINEL SLAVES', service_name)


class ClusterSentinelCommands(SentinelCommandMixin):
    NODES_FLAGS = dict_merge(

# Path: aredis/utils.py
# def dict_merge(*dicts):
#     merged = {}
#     for d in dicts:
#         merged.update(d)
#     return merged
# 
# def nativestr(x):
#     return x if isinstance(x, str) else x.decode('utf-8', 'replace')
# 
# def list_keys_to_dict(key_list, callback):
#     return dict.fromkeys(key_list, callback)
# 
# class NodeFlag:
#     BLOCKED = 'blocked'
#     ALL_NODES = 'all-nodes'
#     ALL_MASTERS = 'all-masters'
#     RANDOM = 'random'
#     SLOT_ID = 'slot-id'
# 
# def bool_ok(response):
#     return nativestr(response) == 'OK'


# Path: aredis/commands/sentinel.py
import warnings
from aredis.utils import (dict_merge, nativestr,
                          list_keys_to_dict,
                          NodeFlag, bool_ok)

        """Returns a dictionary containing the specified masters state."""
        return await self.execute_command('SENTINEL MASTER', service_name)

    async def sentinel_masters(self):
        """Returns a list of dictionaries containing each master's state."""
        return await self.execute_command('SENTINEL MASTERS')

    async def sentinel_monitor(self, name, ip, port, quorum):
        """Adds a new master to Sentinel to be monitored"""
        return await self.execute_command('SENTINEL MONITOR', name, ip, port, quorum)

    async def sentinel_remove(self, name):
        """Removes a master from Sentinel's monitoring"""
        return await self.execute_command('SENTINEL REMOVE', name)

    async def sentinel_sentinels(self, service_name):
        """Returns a list of sentinels for ``service_name``"""
        return await self.execute_command('SENTINEL SENTINELS', service_name)

    async def sentinel_set(self, name, option, value):
        """Sets Sentinel monitoring parameters for a given master"""
        return await self.execute_command('SENTINEL SET', name, option, value)

    async def sentinel_slaves(self, service_name):
        """Returns a list of slaves for ``service_name``"""
        return await self.execute_command('SENTINEL SLAVES', service_name)


class ClusterSentinelCommands(SentinelCommandMixin):
    NODES_FLAGS = dict_merge(

        list_keys_to_dict(