code: def test_as_array_produces_token_sequence_bert_cased(self):
      tokenizer = cached_transformers.get_tokenizer("bert-base-cased")
      allennlp_tokenizer = PretrainedTransformerTokenizer(
          "bert-base-cased"
      )
      indexer = PretrainedTransformerIndexer(
          model_name="bert-base-cased"
      )
      string_specials = "[CLS] AllenNLP is great [SEP]"
      string_no_specials = "AllenNLP is great"
      tokens = tokenizer.tokenize(string_specials)
      expected_ids = tokenizer.convert_tokens_to_ids(tokens)
      # tokens tokenized with our pretrained tokenizer have indices in them
      allennlp_tokens = allennlp_tokenizer.tokenize(string_no_specials)
      vocab = Vocabulary()
      indexed = indexer.tokens_to_indices(allennlp_tokens, vocab)
      assert indexed["token_ids"] == expected_ids
  
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 2 for calling the TestPretrainedTransformerIndexer obj's underlying member method code with example usage: obj.test_as_array_produces_token_sequence_bert_cased() without return types