class_docstr: Test ByteLevelBPE is well-behaved.
class_docstr_tok: ["Test","ByteLevelBPE","is","well-behaved","."]
docstr: Add a list of special tokens to the dictionary.
code: def test_add_special_tokens(self):
      """
      Add a list of special tokens to the dictionary.
      """
      special_toks_lst = ["MY", "NAME", "IS", "EMILY"]
      # create Dictionary Agent
      parser = ParlaiParser()
      parser.set_params(
          dict_tokenizer="bytelevelbpe",
          bpe_vocab=DEFAULT_BYTELEVEL_BPE_VOCAB,
          bpe_merge=DEFAULT_BYTELEVEL_BPE_MERGE,
      )
      opt = parser.parse_args([])
  
      agent = DictionaryAgent(opt)
      agent.add_additional_special_tokens(special_toks_lst)
  
      self.assertEqual(
          agent.additional_special_tokens, special_toks_lst
      )
      phrases = [
          "Hi what is up EMILY",
          "What IS your NAME",
          "That is MY dog",
      ]
      for phrase in phrases:
          vec = agent.txt2vec(phrase)
          text = agent.vec2txt(vec)
          self.assertEqual(phrase, text)
  
imports: from parlai.core.build_data import modelzoo_path
  from parlai.core.dict import find_ngrams
  from parlai.core.params import ParlaiParser
  from parlai.core.dict import DictionaryAgent, TokenizationMode
  from parlai.core.opt import Opt
  import parlai.scripts.build_dict
  from parlai.utils.io import PathManager
  import parlai.utils.testing
  import os
  import shutil
  import unittest
  import pytest
label_desc: Use image node_id 5 for calling the TestByteLevelBPE obj's underlying member method code with example usage: obj.test_add_special_tokens() without return types