code: def preprocess_chatglm_pairwise(
      example, prompter, tokenizer, options
  ):
      model_inputs = {}
      prompt, answer = prompter.generate_prompt(example)
      source_ids = tokenizer.encode(
          text=prompt, add_special_tokens=False
      )
      accept_ids = tokenizer.encode(
          text=answer[0], add_special_tokens=False
      )
      reject_ids = tokenizer.encode(
          text=answer[1], 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(accept_ids) > options.max_target_length - 1:  # eos token
          accept_ids = accept_ids[: options.max_target_length - 1]
      if len(reject_ids) > options.max_target_length - 1:  # eos token
          reject_ids = reject_ids[: options.max_target_length - 1]
  
      accept_ids = tokenizer.build_inputs_with_special_tokens(
          source_ids[:], accept_ids
      )  # avoid copying error
      reject_ids = tokenizer.build_inputs_with_special_tokens(
          source_ids[:], reject_ids
      )
  
      model_inputs["input_ids"] = accept_ids
      model_inputs["labels"] = reject_ids
      return model_inputs
  
label_desc: Use image node_id 3 for calling a global function with example usage: preprocess_chatglm_pairwise(example, prompter, tokenizer, options) and returns: model_inputs