code: def test_training_new_tokenizer(self):
      # This feature only exists for fast tokenizers
      if not self.test_rust_tokenizer:
          return
  
      tokenizer = self.get_rust_tokenizer()
      new_tokenizer = tokenizer.train_new_from_iterator(
          SMALL_TRAINING_CORPUS, 100
      )
  
      # Test we can use the new tokenizer with something not seen during training
      text = [["this", "is", "the"], ["how", "are", "you"]]
      boxes = [
          [[1, 2, 3, 4], [5, 6, 7, 8], [1, 3, 4, 8]],
          [[5, 6, 7, 8], [4, 5, 6, 7], [3, 9, 2, 7]],
      ]
      inputs = new_tokenizer(text, boxes=boxes)
      self.assertEqual(len(inputs["input_ids"]), 2)
      decoded_input = new_tokenizer.decode(
          inputs["input_ids"][0], skip_special_tokens=True
      )
      expected_result = "this is the"
  
      if tokenizer.backend_tokenizer.normalizer is not None:
          expected_result = (
              tokenizer.backend_tokenizer.normalizer.normalize_str(
                  expected_result
              )
          )
      self.assertEqual(expected_result, decoded_input)
  
      # We check that the parameters of the tokenizer remained the same
      # Check we have the same number of added_tokens for both pair and non-pair inputs.
      self.assertEqual(
          tokenizer.num_special_tokens_to_add(False),
          new_tokenizer.num_special_tokens_to_add(False),
      )
      self.assertEqual(
          tokenizer.num_special_tokens_to_add(True),
          new_tokenizer.num_special_tokens_to_add(True),
      )
  
      # Check we have the correct max_length for both pair and non-pair inputs.
      self.assertEqual(
          tokenizer.max_len_single_sentence,
          new_tokenizer.max_len_single_sentence,
      )
      self.assertEqual(
          tokenizer.max_len_sentences_pair,
          new_tokenizer.max_len_sentences_pair,
      )
  
      # Assert the set of special tokens match as we didn't ask to change them
      self.assertSequenceEqual(
          tokenizer.all_special_tokens_extended,
          new_tokenizer.all_special_tokens_extended,
      )
  
      self.assertDictEqual(
          tokenizer.special_tokens_map, new_tokenizer.special_tokens_map
      )
  
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 43 for calling the LayoutXLMTokenizationTest obj's underlying member method code with example usage: obj.test_training_new_tokenizer() without return types