code: def jieba_cut(input_sentence, use_file=True, hmm=True):
      dict_path = os.path.join(
          PACKAGE_ROOT_DIR, "./resources/cppjieba_dict/jieba.dict.utf8"
      )
      hmm_path = os.path.join(
          PACKAGE_ROOT_DIR, "./resources/cppjieba_dict/hmm_model.utf8"
      )
      user_dict_path = os.path.join(
          PACKAGE_ROOT_DIR, "./resources/cppjieba_dict/user.dict.utf8"
      )
      idf_path = os.path.join(
          PACKAGE_ROOT_DIR, "./resources/cppjieba_dict/idf.utf8"
      )
      stop_word_path = os.path.join(
          PACKAGE_ROOT_DIR, "./resources/cppjieba_dict/stop_words.utf8"
      )
  
      if use_file:
          output_sentence = gen_x_ops.jieba_cut(
              input_sentence,
              use_file=use_file,
              hmm=hmm,
              dict_path=dict_path,
              hmm_path=hmm_path,
              user_dict_path=user_dict_path,
              idf_path=idf_path,
              stop_word_path=stop_word_path,
          )
      else:
          dict_lines = read_lines_from_text_file(dict_path)
          model_lines = read_lines_from_text_file(hmm_path)
          user_dict_lines = read_lines_from_text_file(user_dict_path)
          idf_lines = read_lines_from_text_file(idf_path)
          stop_word_lines = read_lines_from_text_file(stop_word_path)
  
          output_sentence = gen_x_ops.jieba_cut(
              input_sentence,
              use_file=use_file,
              hmm=hmm,
              dict_lines=dict_lines,
              model_lines=model_lines,
              user_dict_lines=user_dict_lines,
              idf_lines=idf_lines,
              stop_word_lines=stop_word_lines,
          )
  
      return output_sentence
  
imports: import os
  import delta.compat
  from absl import logging
  from delta import PACKAGE_ROOT_DIR
  from delta.data.utils import read_lines_from_text_file
label_desc: Use image node_id 1 for calling a global function with example usage: jieba_cut(input_sentence, use_file, hmm) and returns: output_sentence