def _convert_token_to_id(self, token: str) -> int:
        """Converts a token (i.e. a Unicode character) in an id (i.e. its integer Unicode code point value)."""
        try:
            return ord(token)
        except TypeError:
            raise ValueError(f"invalid token: '{token}'")
Converts a token (i.e. a Unicode character) in an id (i.e. its integer Unicode code point value).
dpkd/transformers/src/transformers/models/canine/tokenization_canine.py