code: def to_parquet(args):
      (
          SCALE_FACTOR,
          table_name,
          table_short,
          load_func,
          piece,
          num_pieces,
          output_prefix,
      ) = args
      # generate `piece+1` of the table for the given scale factor with dbgen
      dbgen_fname = f"{tpch_dbgen_location}/{table_name}.tbl.{piece+1}"
      remove_file_if_exists(dbgen_fname)
      cmd = f"./dbgen -f -s {SCALE_FACTOR} -S {piece+1} -C {num_pieces} -T {table_short}"
      subprocess.run(cmd.split(), check=True, cwd=tpch_dbgen_location)
      # load csv file into pandas dataframe
      df = load_func(dbgen_fname)
      # csv file no longer needed, remove
      os.remove(dbgen_fname)
      # write dataframe to parquet
      zeros = "0" * (len(str(num_pieces)) - len(str(piece)))
      df.to_parquet(f"{output_prefix}/part-{zeros}{piece}.pq")
  
file_path: mars/benchmarks/tpch/gen_data.py
imports: import os
  import argparse
  import shutil
  import subprocess
  from multiprocessing import Pool, set_start_method
  import pyarrow.parquet
  from loader import load_customer, load_lineitem_with_date, load_nation, load_orders_with_date, load_part, load_partsupp, load_region, load_supplier
label_desc: Use image node_id 3 for calling a global function with example usage: to_parquet(args) without return types