code: def test_transformers_vocab_sizes(self, model_name):
      namespace = "tags"
      tokenizer = cached_transformers.get_tokenizer(model_name)
      allennlp_tokenizer = PretrainedTransformerTokenizer(model_name)
      indexer = PretrainedTransformerIndexer(
          model_name=model_name, namespace=namespace
      )
      allennlp_tokens = allennlp_tokenizer.tokenize(
          "AllenNLP is great!"
      )
      vocab = Vocabulary()
      # here we copy entire transformers vocab
      indexed = indexer.tokens_to_indices(allennlp_tokens, vocab)
      del indexed
      assert (
          vocab.get_vocab_size(namespace=namespace)
          == tokenizer.vocab_size
      )
  
imports: import pytest
  from allennlp.common import cached_transformers
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.data import Vocabulary
  from allennlp.data.token_indexers import PretrainedTransformerIndexer
  from allennlp.data.tokenizers import PretrainedTransformerTokenizer
label_desc: Use image node_id 6 for calling the TestPretrainedTransformerIndexer obj's underlying member method code with example usage: obj.test_transformers_vocab_sizes(model_name) without return types