def _unescape(text):
 pattern = '\\\\{1,2}u[0-9a-fA-F]{4}'
 decode = (lambda x: codecs.getdecoder('unicode_escape')(x.group())[0])
 return re.sub(pattern, decode, text)

def _unescape ( text ) : pattern = '\\\\{1,2}u[0-9a-fA-F]{4}' decode = ( lambda x : codecs . getdecoder ( 'unicode_escape' ) ( x . group ( ) ) [ 0 ] ) return re . sub ( pattern , decode , text )
unescape unicode character codes within a string .