class_docstr: Runs pre-tokenization with Jieba segmentation tool. It is used in CPM models.
class_docstr_tok: ["Runs","pre-tokenization","with","Jieba","segmentation","tool",".","It","is","used","in","CPM","models","."]
code: def save_vocabulary(
      self, save_directory: str, filename_prefix: Optional[str] = None
  ) -> Tuple[str]:
      if not self.can_save_slow_tokenizer:
          raise ValueError(
              "Your fast tokenizer does not have the necessary information to save the vocabulary for a slow "
              "tokenizer."
          )
  
      if not os.path.isdir(save_directory):
          logger.error(
              f"Vocabulary path ({save_directory}) should be a directory"
          )
          return
      out_vocab_file = os.path.join(
          save_directory,
          (filename_prefix + "-" if filename_prefix else "")
          + VOCAB_FILES_NAMES["vocab_file"],
      )
  
      if os.path.abspath(self.vocab_file) != os.path.abspath(
          out_vocab_file
      ):
          copyfile(self.vocab_file, out_vocab_file)
  
      return (out_vocab_file,)
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/models/cpm/tokenization_cpm_fast.py
imports: import os
  from shutil import copyfile
  from typing import List, Optional, Tuple
  from ...tokenization_utils_fast import AddedToken, PreTrainedTokenizerFast
  from ...utils import logging
label_desc: Use image node_id 4 for calling the CpmTokenizerFast obj's underlying member method code with example usage: obj.save_vocabulary(save_directory, filename_prefix) and returns: out_vocab_file