code: def run_benchmarks(PipeType, args):
      print("Running Benchmarks For {}".format(PipeType.__name__))
      for executor in args.executors:
          pipelined = executor > 0
          exec_async = executor > 1
          for batch_size in args.batch_sizes:
              for num_threads in args.thread_counts:
                  pipe = PipeType(
                      batch_size, num_threads, 0, pipelined, exec_async
                  )
                  pipe.build()
                  start_time = timer()
                  for i in range(args.num_iters):
                      pipe.run()
  
                  total_time = timer() - start_time
                  print(
                      "{}/{}/{}/{}: FPS={}".format(
                          PipeType.__name__,
                          executor,
                          batch_size,
                          num_threads,
                          float(batch_size * args.num_iters)
                          / total_time,
                      )
                  )
  
imports: import argparse
  from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops
  import nvidia.dali.types
  import numpy
  from timeit import default_timer
label_desc: Use image node_id 3 for calling a global function with example usage: run_benchmarks(PipeType, args) without return types