Inverse of _escape_token().
    Args:
      escaped_token: a unicode string
    Returns:
      token: a unicode string

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):
            return ""

    trimmed = escaped_token[:-1] if escaped_token.endswith("_") else escaped_token
    return _UNESCAPE_REGEX.sub(match, trimmed)