code: def gen_file(
      data,
      save_name_base,
      split_type,
      sft_format,
      make_ground_truth=False,
  ):
      save_path = f"{save_name_base}_{split_type}.jsonl"
  
      if make_ground_truth:
          save_path = (
              f"{save_name_base}_{split_type}_ground_truth.jsonl"
          )
  
      print(f"Saving {split_type} split to {save_path}")
  
      with open(save_path, "w") as save_file:
          for example_json in tqdm(data):
              # Dont want labels in the test set
              if split_type == "test" and not make_ground_truth:
                  if sft_format:
                      example_json["output"] = ""
                  else:
                      del example_json["answer"]
  
              save_file.write(json.dumps(example_json) + "\n")
  
imports: import argparse
  import json
  from tqdm import tqdm
label_desc: Use image node_id 4 for calling a global function with example usage: gen_file(data, save_name_base, split_type, sft_format, make_ground_truth) without return types