code: def preprocess_chatglm(example, prompter, tokenizer, options):
      model_inputs = {}
      prompt = prompter.generate_prompt(
          example["instruction"], example["input"]
      )
      source_ids = tokenizer.encode(
          text=prompt, add_special_tokens=False
      )
      target_ids = tokenizer.encode(
          text=example["output"], add_special_tokens=False
      )
  
      if (
          len(source_ids) > options.max_source_length - 2
      ):  # gmask and sop tokens
          source_ids = source_ids[: options.max_source_length - 2]
      if len(target_ids) > options.max_target_length - 1:  # eos token
          target_ids = target_ids[: options.max_target_length - 1]
  
      context_length = len(source_ids) + 2  # gmask and sop tokens
      input_ids = tokenizer.build_inputs_with_special_tokens(
          source_ids, target_ids
      )
      labels = [IGNORE_INDEX] * context_length + input_ids[
          context_length:
      ]
  
      model_inputs["input_ids"] = input_ids
      model_inputs["labels"] = labels
      return model_inputs
  
label_desc: Use image node_id 1 for calling a global function with example usage: preprocess_chatglm(example, prompter, tokenizer, options) and returns: model_inputs