def METHOD_NAME(self, index):
    """Converts an index (integer) in a token (str) using the vocab."""
    if index < self.sp_model.get_piece_size():
        token = self.sp_model.IdToPiece(index)
    else:
        token = "<extra_id_{}>".format(self.vocab_size - 1 - index)
    return token