def _convert_id_to_token(self, index):
        """Converts an index (integer) in a token (str) using the vocab."""
        if index in self.ids_to_tokens:
            return self.ids_to_tokens[index]
        return self.sp_model.IdToPiece(index - self.offset)
Converts an index (integer) in a token (str) using the vocab.
ptstructure/vqa/pytorchnlp/transformers/layoutxlm/tokenizer.py