code: def test_intra_word_tokenize(self):
      tokenizer = PretrainedTransformerTokenizer("bert-base-cased")
  
      sentence = "A, [MASK] AllenNLP sentence.".split(" ")
      expected_tokens = [
          "[CLS]",
          "A",
          ",",
          "[MASK]",
          "Allen",
          "##NL",
          "##P",
          "sentence",
          ".",
          "[SEP]",
      ]
      expected_offsets = [(1, 2), (3, 3), (4, 6), (7, 8)]
      tokens, offsets = tokenizer.intra_word_tokenize(sentence)
      tokens = [t.text for t in tokens]
      assert tokens == expected_tokens
      assert offsets == expected_offsets
  
      # sentence pair
      sentence_1 = "A, [MASK] AllenNLP sentence.".split(" ")
      sentence_2 = "A sentence.".split(" ")
      expected_tokens = [
          "[CLS]",
          "A",
          ",",
          "[MASK]",
          "Allen",
          "##NL",
          "##P",
          "sentence",
          ".",
          "[SEP]",
          "A",  # 10
          "sentence",
          ".",
          "[SEP]",
      ]
      expected_offsets_a = [(1, 2), (3, 3), (4, 6), (7, 8)]
      expected_offsets_b = [(10, 10), (11, 12)]
      (
          tokens,
          offsets_a,
          offsets_b,
      ) = tokenizer.intra_word_tokenize_sentence_pair(
          sentence_1, sentence_2
      )
      tokens = [t.text for t in tokens]
      assert tokens == expected_tokens
      assert offsets_a == expected_offsets_a
      assert offsets_b == expected_offsets_b
  
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 11 for calling the TestPretrainedTransformerTokenizer obj's underlying member method code with example usage: obj.test_intra_word_tokenize() without return types