code: def test_number_of_added_tokens(self):
      tokenizers = self.get_tokenizers(do_lower_case=False)
      for tokenizer in tokenizers:
          with self.subTest(f"{tokenizer.__class__.__name__}"):
              # test 1: single sequence
              nodes, xpaths = self.get_nodes_and_xpaths()
  
              sequences = tokenizer.encode(
                  nodes, xpaths=xpaths, add_special_tokens=False
              )
              attached_sequences = tokenizer.encode(
                  nodes, xpaths=xpaths, add_special_tokens=True
              )
  
              # Method is implemented (e.g. not GPT-2)
              if len(attached_sequences) != 2:
                  self.assertEqual(
                      tokenizer.num_special_tokens_to_add(pair=False),
                      len(attached_sequences) - len(sequences),
                  )
  
              # test 2: two sequences
              (
                  question,
                  nodes,
                  xpaths,
              ) = self.get_question_nodes_and_xpaths()
  
              sequences = tokenizer.encode(
                  question,
                  nodes,
                  xpaths=xpaths,
                  add_special_tokens=False,
              )
              attached_sequences = tokenizer.encode(
                  question,
                  nodes,
                  xpaths=xpaths,
                  add_special_tokens=True,
              )
  
              # Method is implemented (e.g. not GPT-2)
              if len(attached_sequences) != 2:
                  self.assertEqual(
                      tokenizer.num_special_tokens_to_add(pair=True),
                      len(attached_sequences) - len(sequences),
                  )
  
imports: import inspect
  import json
  import os
  import re
  import shutil
  import tempfile
  import unittest
  from typing import List
  from transformers import AddedToken, MarkupLMTokenizerFast, SpecialTokensMixin, is_tf_available, is_torch_available, logging
  from transformers.models.markuplm.tokenization_markuplm import VOCAB_FILES_NAMES, MarkupLMTokenizer
  from transformers.testing_utils import is_pt_tf_cross_test, require_tokenizers, require_torch, slow
  from ...test_tokenization_common import SMALL_TRAINING_CORPUS, TokenizerTesterMixin, merge_model_tokenizer_mappings
label_desc: Use image node_id 14 for calling the MarkupLMTokenizationTest obj's underlying member method code with example usage: obj.test_number_of_added_tokens() without return types