code: def test_compare_add_special_tokens(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
              )
  
              simple_num_special_tokens_to_add = (
                  tokenizer_r.num_special_tokens_to_add(pair=False)
              )
  
              nodes, xpaths = self.get_nodes_and_xpaths()
              # tokenize()
              no_special_tokens = tokenizer_r.tokenize(
                  " ".join(nodes), add_special_tokens=False
              )
              with_special_tokens = tokenizer_r.tokenize(
                  " ".join(nodes), add_special_tokens=True
              )
              self.assertEqual(
                  len(no_special_tokens),
                  len(with_special_tokens)
                  - simple_num_special_tokens_to_add,
              )
  
              # encode()
              no_special_tokens = tokenizer_r.encode(
                  nodes, xpaths=xpaths, add_special_tokens=False
              )
              with_special_tokens = tokenizer_r.encode(
                  nodes, xpaths=xpaths, add_special_tokens=True
              )
              self.assertEqual(
                  len(no_special_tokens),
                  len(with_special_tokens)
                  - simple_num_special_tokens_to_add,
              )
  
              # encode_plus()
              no_special_tokens = tokenizer_r.encode_plus(
                  nodes, xpaths=xpaths, add_special_tokens=False
              )
              with_special_tokens = tokenizer_r.encode_plus(
                  nodes, xpaths=xpaths, add_special_tokens=True
              )
              for key in no_special_tokens.keys():
                  self.assertEqual(
                      len(no_special_tokens[key]),
                      len(with_special_tokens[key])
                      - simple_num_special_tokens_to_add,
                  )
  
              # # batch_encode_plus
              nodes, xpaths = self.get_nodes_and_xpaths_batch()
  
              no_special_tokens = tokenizer_r.batch_encode_plus(
                  nodes, xpaths=xpaths, add_special_tokens=False
              )
              with_special_tokens = tokenizer_r.batch_encode_plus(
                  nodes, xpaths=xpaths, add_special_tokens=True
              )
              for key in no_special_tokens.keys():
                  for i_no, i_with in zip(
                      no_special_tokens[key], with_special_tokens[key]
                  ):
                      self.assertEqual(
                          len(i_no),
                          len(i_with)
                          - simple_num_special_tokens_to_add,
                      )
  
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 34 for calling the MarkupLMTokenizationTest obj's underlying member method code with example usage: obj.test_compare_add_special_tokens() without return types