code: def test_token_idx_wikipedia(self):
      sentence = (
          "Tokyo (東京 Tōkyō, English: /ˈtoʊkioʊ/,[7] Japanese: [toːkʲoː]), officially "
          "Tokyo Metropolis (東京都 Tōkyō-to), is one of the 47 prefectures of Japan."
      )
      for tokenizer_name in [
          "roberta-base",
          "bert-base-uncased",
          "bert-base-cased",
      ]:
          tokenizer = PretrainedTransformerTokenizer(tokenizer_name)
          tokenized = tokenizer.tokenize(sentence)
          assert tokenized[-2].text == "."
          assert tokenized[-2].idx == len(sentence) - 1
  
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 10 for calling the TestPretrainedTransformerTokenizer obj's underlying member method code with example usage: obj.test_token_idx_wikipedia() without return types