def to_unicode(value):
if isinstance(value, _TO_UNICODE_TYPES):<EOL><INDENT>return value<EOL><DEDENT>assert isinstance(value, bytes)<EOL>return value.decode("<STR_LIT:utf-8>")<EOL>
Converts a string argument to a unicode string.

    If the argument is already a unicode string or None, it is returned
    unchanged.  Otherwise it must be a byte string and is decoded as utf8.