code: def cpu_bench(algo, bench_step, dataset, inference_args, cpu_setup):
      if algo.cpu_class is None:
          return
  
      t = time.process_time()
      if bench_step == "training":
          algo.run_cpu(dataset, **cpu_setup)
      elif bench_step == "inference":
          algo.run_cpu(dataset, **inference_args, **cpu_setup)
      elapsed_time = time.process_time() - t
  
      print(
          "\n" + "\033[33m" + "=x" * 20 + "  CPU BENCHMARK " + "=x" * 20
      )
      print(algo.name + " : " + str(algo.cpu_class))
      print("\tbench_function: " + str(algo.bench_func))
      print("\truntime: " + str(elapsed_time))
      print("=x" * 48 + "\033[0m" + "\n")
  
imports: import os
  import json
  import time
  import math
  import itertools
  import warnings
  from cuml.internals.safe_imports import cpu_only_import, gpu_only_import
  import pytest
  from cuml.benchmark import datagen, algorithms
  from cuml.benchmark.nvtx_benchmark import Profiler
  from dask.distributed import wait
  import dask.array
  import dask.dataframe
  from copy import copy
  from cuml.benchmark.bench_helper_funcs import pass_func, fit, predict, transform, kneighbors, fit_predict, fit_transform, fit_kneighbors
label_desc: Use image node_id 3 for calling a global function with example usage: cpu_bench(algo, bench_step, dataset, inference_args, cpu_setup) without return types