code: def text_to_tokens(self, text: str) -> List[str]:
      token_candidates = [char for char in text]
      tokens = []
      if self.special_token_to_prepend is not None:
          tokens.append(getattr(self, self.special_token_to_prepend))
      for i, token in enumerate(token_candidates):
          if token in self.vocab:
              tokens.append(token)
          elif self.unk_token is not None:
              tokens.append(self.unk_token)
          else:
              warnings.warn(
                  f"Character {repr(token)} in position {i} is not present in vocabulary and no `<UNK>` token was "
                  f"set. Character {repr(token)} is discarded."
              )
      if self.special_token_to_append is not None:
          tokens.append(getattr(self, self.special_token_to_append))
      return tokens
  
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 8 for calling the CharTokenizer obj's underlying member method code with example usage: obj.text_to_tokens(text) and returns: tokens