def METHOD_NAME(self, channel_names, message):
    cl = get_channel_layer()
    # Connection dict keyed by index to list of redis keys mapped on that index
    connection_to_channel_keys = collections.defaultdict(list)
    # For each channel
    for channel in channel_names:
        channel_non_local_name = channel
        if "!" in channel:
            channel_non_local_name = cl.non_local_name(channel)
        # Get its redis key
        channel_key = cl.prefix + channel_non_local_name
        message = dict(message.items())
        message["__asgi_channel__"] = [channel]
        idx = cl.consistent_hash(channel_non_local_name)
        connection_to_channel_keys[idx].append((channel_key, cl.serialize(message)))
    return (connection_to_channel_keys,)