def to_unicode(path, errors="<STR_LIT:replace>"):
if isinstance(path, UNICODE):<EOL><INDENT>return path<EOL><DEDENT>return path.decode(sys.getfilesystemencoding(), errors)<EOL>
Given a bytestring/unicode path, return it as unicode.