(escaped_token)
return _UNESCAPE_REGEX.sub(match, trimmed)
Inverse of _escape_token().

  Args:
    escaped_token: a unicode string

  Returns:
    token: a unicode string
Inverse of _escape_token().
Inverse of _escape_token () .
def _unescape_token(escaped_token):
  """Inverse of _escape_token().

  Args:
    escaped_token: a unicode string

  Returns:
    token: a unicode string
  """

  def match(m):
    if m.group(1) is None:
      return u"_" if m.group(0) == u"\\u" else u"\\"

    try:
      return six.unichr(int(m.group(1)))
    except (ValueError, OverflowError) as _:
      return u"\u3013"  # Unicode for undefined character.

  trimmed = escaped_token[:-1] if escaped_token.endswith("_") else escaped_token
  return _UNESCAPE_REGEX.sub(match, trimmed)
def _unescape_token ( escaped_token ) : def match ( m ) : if m . group ( 1 ) is None : return u"_" if m . group ( 0 ) == u"\\u" else u"\\" try : return six . unichr ( int ( m . group ( 1 ) ) ) except ( ValueError , OverflowError ) as _ : return u"\u3013" # Unicode for undefined character. trimmed = escaped_token [ : - 1 ] if escaped_token . endswith ( "_" ) else escaped_token return _UNESCAPE_REGEX . sub ( match , trimmed )