code: def test_offsets_with_special_characters(self):
      for tokenizer, pretrained_name, kwargs in self.tokenizers_list:
          with self.subTest(
              f"{tokenizer.__class__.__name__} ({pretrained_name})"
          ):
              tokenizer_r = self.rust_tokenizer_class.from_pretrained(
                  pretrained_name, **kwargs
              )
  
              words, boxes = self.get_words_and_boxes()
              words[1] = tokenizer_r.mask_token
              tokens = tokenizer_r.encode_plus(
                  words,
                  boxes=boxes,
                  return_attention_mask=False,
                  return_token_type_ids=False,
                  return_offsets_mapping=True,
                  add_special_tokens=True,
              )
  
              expected_results = [
                  ((0, 0), tokenizer_r.cls_token),
                  ((0, 1), "▁a"),
                  ((0, 6), tokenizer_r.mask_token),
                  ((0, 4), "▁test"),
                  ((0, 0), tokenizer_r.sep_token),
              ]
  
              self.assertEqual(
                  [e[1] for e in expected_results],
                  tokenizer_r.convert_ids_to_tokens(
                      tokens["input_ids"]
                  ),
              )
              self.assertEqual(
                  [e[0] for e in expected_results],
                  tokens["offset_mapping"],
              )
  
imports: import inspect
  import shutil
  import tempfile
  import unittest
  from typing import List
  from transformers import AddedToken, LayoutXLMTokenizerFast, SpecialTokensMixin, is_tf_available, is_torch_available, logging
  from transformers.models.layoutxlm.tokenization_layoutxlm import LayoutXLMTokenizer
  from transformers.testing_utils import get_tests_dir, is_pt_tf_cross_test, require_pandas, require_scatter, require_sentencepiece, require_tokenizers, require_torch, slow
  from ...test_tokenization_common import SMALL_TRAINING_CORPUS, TokenizerTesterMixin, filter_non_english, merge_model_tokenizer_mappings
label_desc: Use image node_id 9 for calling the LayoutXLMTokenizationTest obj's underlying member method code with example usage: obj.test_offsets_with_special_characters() without return types