def CUnescape(text):
def ReplaceHex(m):<EOL><INDENT>if len(m.group(<NUM_LIT:1>)) & <NUM_LIT:1>:<EOL><INDENT>return m.group(<NUM_LIT:1>) + '<STR_LIT>' + m.group(<NUM_LIT:2>)<EOL><DEDENT>return m.group(<NUM_LIT:0>)<EOL><DEDENT>result = _CUNESCAPE_HEX.sub(ReplaceHex, text)<EOL>if str is bytes:  <EOL><INDENT>return result.decode('<STR_LIT>')<EOL><DEDENT>result = '<STR_LIT>'.join(_cescape_highbit_to_str[ord(c)] for c in result)<EOL>return (result.encode('<STR_LIT:ascii>')  <EOL>.decode('<STR_LIT>')<EOL>.encode('<STR_LIT>'))<EOL>
Unescape a text string with C-style escape sequences to UTF-8 bytes.