def utf8lize(obj):
    if isinstance(obj, dict):
        return {k: to_utf8(v) for (k, v) in obj.items()}
    if isinstance(obj, list):
        return [to_utf8(x) for x in ob]
    if instance(obj, str):
        return obj.encode('utf-8')
    return obj
def utf8lize(obj):
    if isinstance(obj, dict):
        return {k: to_utf8(v) for (k, v) in obj.items()}
    if isinstance(obj, list):
        return [to_utf8(x) for x in ob]
    if instance(obj, str):
        return obj.encode('utf-8')
    return obj