<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def json_unicode_to_utf8(data):
 """Change all strings in a JSON structure to UTF-8."""

    if isinstance(data, unicode):
        return data.encode('utf-8')
    elif isinstance(data, dict):
        newdict = {}
        for key in data:
            newdict[json_unicode_to_utf8(
                key)] = json_unicode_to_utf8(data[key])
        return newdict
    elif isinstance(data, list):
        return [json_unicode_to_utf8(elem) for elem in data]
    else:
        return data