    def convert_tokens_to_ids(self, tokens):
        """
        Converts a sequence of tokens into ids using the `vocab` attribute (an
        instance of `Vocab`). Override it if needed.

        Args：
            tokens (list[int]): List of token ids.

        Returns:
            list: Converted id list.
        """
        return self.vocab.to_indices(tokens)
Converts a sequence of tokens into ids using the `vocab` attribute (an
instance of `Vocab`). Override it if needed.

Args：
tokens (list[int]): List of token ids.

Returns:
list: Converted id list.
ptstructure/vqa/pytorchnlp/transformers/tokenizer_utils.py