def _convert_token_to_id(self, token):
        """Converts a token (str) in an id using the vocab."""
        if len(token) != 1:
            token_id = self.unk_token_id
        else:
            token_id = ord(token) + self._num_special_tokens
        return token_id
Converts a token (str) in an id using the vocab.
dpkd/transformers/src/transformers/models/perceiver/tokenization_perceiver.py