def _try_decode(byte_string):
try:<EOL><INDENT>return str_cls(byte_string, _encoding)<EOL><DEDENT>except (UnicodeDecodeError):<EOL><INDENT>for encoding in _fallback_encodings:<EOL><INDENT>try:<EOL><INDENT>return str_cls(byte_string, encoding, errors='<STR_LIT:strict>')<EOL><DEDENT>except (UnicodeDecodeError):<EOL><INDENT>pass<EOL><DEDENT><DEDENT><DEDENT>return str_cls(byte_string, errors='<STR_LIT:replace>')<EOL>
Tries decoding a byte string from the OS into a unicode string

:param byte_string:
    A byte string

:return:
    A unicode string