code: def create_special_tokens_dict(
      mask_token: Optional[str] = None,
      bos_token: Optional[str] = None,
      eos_token: Optional[str] = None,
      pad_token: Optional[str] = None,
      sep_token: Optional[str] = None,
      cls_token: Optional[str] = None,
      unk_token: Optional[str] = None,
  ):
      special_tokens_dict = {}
      for value, name in zip(
          [
              pad_token,
              unk_token,
              bos_token,
              eos_token,
              sep_token,
              mask_token,
              cls_token,
          ],
          [
              "pad_token",
              "unk_token",
              "bos_token",
              "eos_token",
              "sep_token",
              "mask_token",
              "cls_token",
          ],
      ):
          if value is not None:
              if not isinstance(value, str):
                  raise ValueError(
                      f"The type of parameter `{name}` has to be `None` or `str`, found `{type(value)}`"
                  )
              elif len(value) == 0:
                  raise ValueError(
                      f"If the parameter `{name}` is `str`, then its length has to be nonzero."
                  )
              elif value in special_tokens_dict.values():
                  other_name = None
                  for k, v in special_tokens_dict.items():
                      if v == value:
                          other_name = k
                  raise ValueError(
                      f"The value {repr(value)} of special token `{name}` is the same as the value of special token "
                      f"`{other_name}`."
                  )
              special_tokens_dict[name] = value
      return special_tokens_dict
  
imports: import json
  import os
  import warnings
  from collections import Counter
  from enum import Enum
  from pathlib import Path
  from typing import Dict, List, NewType, Optional, Union
  from nemo.collections.common.tokenizers.tokenizer_spec import TokenizerSpec
label_desc: Use image node_id 23 for calling the CharTokenizer obj's underlying member method code with example usage: obj.create_special_tokens_dict(mask_token, bos_token, eos_token, pad_token, sep_token, cls_token, unk_token) and returns: special_tokens_dict