code: def run_benchmark(
      pipe_fun, batch_size, num_threads, num_samples, debug, data_path
  ):
      num_iters = num_samples // batch_size
      times = np.empty(num_iters + 1)
  
      times[0] = time()
      pipe = pipe_fun(
          data_path,
          batch_size=batch_size,
          num_threads=num_threads,
          debug=debug,
      )
      pipe.build()
      build_time = time()
  
      for i in range(num_iters):
          pipe.run()
          times[i + 1] = time()
  
      full_time = times[-1] - build_time
      times = np.diff(times)
  
      return full_time, times[0], times[1:]
  
file_path: DALI/dali/test/python/test_pipeline_debug_resnet50.py
imports: import argparse
  import numpy
  import nvidia.dali.fn
  import nvidia.dali.types
  import os
  from itertools import product
  from nvidia.dali.pipeline.experimental import pipeline_def
  from time import time
  from test_utils import get_dali_extra_path
label_desc: Use image node_id 3 for calling a global function with example usage: run_benchmark(pipe_fun, batch_size, num_threads, num_samples, debug, data_path) and returns: full_time,  times,  times