code: def dataset_benchmark(args, cfg, distributed, logger):
      benchmark = DatasetBenchmark(
          cfg,
          args.dataset_type,
          args.max_iter,
          args.log_interval,
          args.num_warmup,
          logger=logger,
      )
      return benchmark
  
file_path: mmdetection/tools/analysis_tools/benchmark.py
imports: import argparse
  import os
  from mmengine import MMLogger
  from mmengine.config import Config, DictAction
  from mmengine.dist import init_dist
  from mmengine.registry import init_default_scope
  from mmengine.utils import mkdir_or_exist
  from mmdet.utils.benchmark import DataLoaderBenchmark, DatasetBenchmark, InferenceBenchmark
label_desc: Use image node_id 4 for calling a global function with example usage: dataset_benchmark(args, cfg, distributed, logger) and returns: benchmark