code: def test_token_idx_bert_uncased(self):
      sentence = "A, naïve [MASK] AllenNLP sentence."
      expected_tokens = [
          "[CLS]",
          "a",
          ",",
          "naive",  # BERT normalizes this away
          "[MASK]",
          "allen",
          "##nl",
          "##p",
          "sentence",
          ".",
          "[SEP]",
      ]
      expected_idxs = [None, 0, 1, 3, 9, 16, 21, 23, 25, 33, None]
      tokenizer = PretrainedTransformerTokenizer("bert-base-uncased")
      tokenized = tokenizer.tokenize(sentence)
      tokens = [t.text for t in tokenized]
      assert tokens == expected_tokens
      idxs = [t.idx for t in tokenized]
      assert idxs == expected_idxs
  
imports: from typing import Iterable, List
  import pytest
  from allennlp.common import Params
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.data import Token
  from allennlp.data.tokenizers import PretrainedTransformerTokenizer
label_desc: Use image node_id 5 for calling the TestPretrainedTransformerTokenizer obj's underlying member method code with example usage: obj.test_token_idx_bert_uncased() without return types