@staticmethod<EOL><INDENT>def decode(byte, *, encoding=None, errors='<STR_LIT:strict>'):<DEDENT>
charset = encoding or chardet.detect(byte)['<STR_LIT>']<EOL>try:<EOL><INDENT>return byte.decode(charset or '<STR_LIT:utf-8>', errors=errors)<EOL><DEDENT>except UnicodeError:<EOL><INDENT>return r'<STR_LIT>'.join(chr(char) for char in byte)<EOL><DEDENT>
Decode bytes into str.