code: def check_special_tokens_to_remove_while_decoding(
      special_tokens_to_remove_while_decoding, special_tokens_dict
  ):
      if isinstance(special_tokens_to_remove_while_decoding, list):
          for i, value in enumerate(
              special_tokens_to_remove_while_decoding
          ):
              if not SpecialTokenString.has_value(value):
                  raise ValueError(
                      f"Wrong element with value {repr(value)} in position {i} of parameter "
                      f"`special_tokens_to_remove_while_decoding` of `CharTokenizer` constructor. Supported values "
                      f"are {[e.value for e in SpecialTokenString]}."
                  )
              elif value + "_token" not in special_tokens_dict:
                  raise ValueError(
                      f"You should provide `{value + '_token'}` parameter to `CharTokenizer` constructor if "
                      f"you wish to pass token {repr(value)} in parameter `special_tokens_to_remove_while_decoding`. "
                      f"`{value + '_token'}` was detected in position {i} in "
                      f"`special_tokens_to_remove_while_decoding`."
                  )
      elif (
          isinstance(special_tokens_to_remove_while_decoding, str)
          and special_tokens_to_remove_while_decoding != "all"
          or not isinstance(
              special_tokens_to_remove_while_decoding, str
          )
      ):
          raise ValueError(
              f"Parameter `special_tokens_to_remove_while_decoding` of `CharTokenizer` constructor has to be "
              f"equal to a string 'all' or be a list of values from set {set(e.value for e in SpecialTokenString)} "
              f"whereas `special_tokens_to_remove_while_decoding={repr(special_tokens_to_remove_while_decoding)}`"
          )
  
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 7 for calling the CharTokenizer obj's underlying member method code with example usage: obj.check_special_tokens_to_remove_while_decoding(special_tokens_to_remove_while_decoding, special_tokens_dict) without return types