def dict_to_unicode(raw_dict):
    """
    Ensure all keys and values in a dict are unicode.

    The passed dict is assumed to have lists for all values.
    """
    decoded = {}
    for key, value in raw_dict.items():
        decoded[to_unicode(key)] = map(
            to_unicode, value)
    return decoded
Ensure all keys and values in a dict are unicode.

    The passed dict is assumed to have lists for all values.