docstr: Test `tokenize` with special tokens.
docstr_tok: ["Test","`","tokenize","`","with","special","tokens","."]
code: def test_tokenize_special_tokens(self):
      """Test `tokenize` with special tokens."""
      tokenizers = self.get_tokenizers(fast=True, do_lower_case=True)
      for tokenizer in tokenizers:
          with self.subTest(f"{tokenizer.__class__.__name__}"):
              SPECIAL_TOKEN_1 = "[SPECIAL_TOKEN_1]"
              SPECIAL_TOKEN_2 = "[SPECIAL_TOKEN_2]"
  
              # TODO:
              # Can we combine `unique_no_split_tokens` and `all_special_tokens`(and properties related to it)
              # with one variable(property) for a better maintainability?
  
              # `add_tokens` method stores special tokens only in `tokenizer.unique_no_split_tokens`. (in tokenization_utils.py)
              tokenizer.add_tokens(
                  [SPECIAL_TOKEN_1], special_tokens=True
              )
              # `add_special_tokens` method stores special tokens in `tokenizer.additional_special_tokens`,
              # which also occur in `tokenizer.all_special_tokens`. (in tokenization_utils_base.py)
              tokenizer.add_special_tokens(
                  {"additional_special_tokens": [SPECIAL_TOKEN_2]}
              )
  
              token_1 = tokenizer.tokenize(SPECIAL_TOKEN_1)
              token_2 = tokenizer.tokenize(SPECIAL_TOKEN_2)
  
              self.assertEqual(len(token_1), 1)
              self.assertEqual(len(token_2), 1)
              self.assertEqual(token_1[0], SPECIAL_TOKEN_1)
              self.assertEqual(token_2[0], SPECIAL_TOKEN_2)
  
imports: import json
  import os
  import shutil
  import tempfile
  import unittest
  from typing import List
  import pandas
  from transformers import AddedToken, TapexTokenizer
  from transformers.models.tapex.tokenization_tapex import VOCAB_FILES_NAMES
  from transformers.testing_utils import is_pt_tf_cross_test, require_pandas, slow
  from ...test_tokenization_common import TokenizerTesterMixin
label_desc: Use image node_id 23 for calling the TapexTokenizationTest obj's underlying member method code with example usage: obj.test_tokenize_special_tokens() without return types