code: def data_gen_for_lm():
      # LM data gen
      # the `labels` of LM is the token of the output, cause no padding, use `input_ids` as `labels`
      data = data_gen()
      data["labels"] = data["input_ids"].clone()
      return data
  
file_path: colossalai/tests/kit/model_zoo/transformers/gpt.py
imports: import copy
  import torch
  import transformers
  from ..registry import ModelAttribute, model_zoo
label_desc: Use image node_id 2 for calling a global function with example usage: data_gen_for_lm() and returns: data