def to_unicode(obj):
if not isinstance(obj, six.string_types):<EOL><INDENT>return obj<EOL><DEDENT>try:<EOL><INDENT>obj = six.text_type(obj)<EOL><DEDENT>except TypeError:<EOL><INDENT>pass<EOL><DEDENT>return obj<EOL>
Convert obj to unicode (if it can be be converted).

    Conversion is only attempted if `obj` is a string type (as
    determined by :data:`six.string_types`).

    .. versionchanged:: 0.7.0
       removed `encoding keyword argument