def _convert_id_to_token(self, index: int) -> Optional[str]:
        """Converts an index (integer) in a token (str) using the vocab."""
        # For tokens in either the gap in ids in the tokenizer, or beyond the range of the tokenizer,
        # we return empty string. This matches the behavior of Hugging Face fast tokenizers,
        # but not slow tokenizers.
        return self.decoder.get(index, '')
Converts an index (integer) in a token (str) using the vocab.
llmfoundry/tokenizers/tiktoken.py