code: def main():
      global queries
  
      parser = argparse.ArgumentParser(description="tpch-queries")
      parser.add_argument(
          "--folder",
          type=str,
          help="The folder containing TPCH data",
      )
      parser.add_argument(
          "--endpoint",
          type=str,
          help="Endpoint to connect to, if not provided, will create a local cluster",
      )
      parser.add_argument(
          "-q",
          "--query",
          type=str,
          help=(
              "Queries selected to run, separated by commas. If not provided, "
              "all tests will be executed"
          ),
      )
      parser.add_argument(
          "--use-arrow-dtype",
          type=str,
          choices=["true", "false"],
          help="Use arrow dtype to read parquet",
      )
      parser.add_argument(
          "--gpu",
          "-g",
          action="store_true",
          help="Use GPU to read parquet",
      )
      parser.add_argument(
          "--cuda-devices",
          type=str,
          help="GPU devices to use, use comma to split, only available when using GPU",
      )
      args = parser.parse_args()
      folder = args.folder
      endpoint = args.endpoint
      use_arrow_dtype = args.use_arrow_dtype
      if use_arrow_dtype == "true":
          use_arrow_dtype = True
      elif use_arrow_dtype == "false":
          use_arrow_dtype = False
      queries = (
          set(x.lower().strip() for x in args.query.split(","))
          if args.query
          else None
      )
      gpu = args.gpu
      new_session_kwargs = dict()
      if gpu and args.cuda_devices:
          cuda_devices = args.cuda_devices.split(",")
          new_session_kwargs["cuda_devices"] = [
              int(d) for d in cuda_devices
          ]
      sess = mars.new_session(endpoint, **new_session_kwargs)
      try:
          run_queries(folder, use_arrow_dtype=use_arrow_dtype, gpu=gpu)
      finally:
          if endpoint is None:
              sess.stop_server()
  
imports: import argparse
  import functools
  import time
  from typing import Callable, List, Optional, Set, Union
  import mars
  import mars.dataframe
label_desc: Use image node_id 33 for calling a global function with example usage: main() without return types