def to_str(s):
if isinstance(s, bytes):<EOL><INDENT>s = s.decode('<STR_LIT:utf-8>')<EOL><DEDENT>elif not isinstance(s, str):<EOL><INDENT>s = str(s)<EOL><DEDENT>return s<EOL>
Convert bytes and non-string into Python 3 str