code: def main(
      input_file="2023-04-12_oasst_all.trees.jsonl",
      output_file_prefix="oasst_output",
      mask_role="User",
      type="TEXT_TO_VALUE",
      split_ratio=0.95,
      seed=10,
  ):
      all_objs = []
      with open(input_file, "r", encoding="utf-8") as f:
          for line in f:
              obj = json.loads(line)
              all_objs.append(obj)
      random.seed(seed)
      random.shuffle(all_objs)
      train_num = int(len(all_objs) * split_ratio)
      train_objs = all_objs[:train_num]
      val_objs = all_objs[train_num:]
      train_records = get_data_records(train_objs, mask_role, type)
      val_records = get_data_records(val_objs, mask_role, type)
  
      with open(
          f"{output_file_prefix}_train.jsonl", "w", encoding="utf-8"
      ) as f:
          for record in train_records:
              f.write(json.dumps(record, ensure_ascii=False) + "\n")
  
      with open(
          f"{output_file_prefix}_val.jsonl", "w", encoding="utf-8"
      ) as f:
          for record in val_records:
              f.write(json.dumps(record, ensure_ascii=False) + "\n")
  
      for label in label_values:
          values = sorted(list(label_values[label]))
          print(f"{label} values: {values}")
  
imports: import json
  import random
  import fire
label_desc: Use image node_id 4 for calling a global function with example usage: main(input_file, output_file_prefix, mask_role, type, split_ratio, seed) without return types