code: def _run_operator_performance_test(
      op, inputs, run_backward, warmup, runs, kwargs_list, profiler
  ):
      if profiler == "native":
          if run_backward:
              benchmark_helper_func = cpp_profile(
                  nd_forward_backward_and_profile
              )
          else:
              benchmark_helper_func = cpp_profile(
                  nd_forward_and_profile
              )
      elif profiler == "python":
          if run_backward:
              benchmark_helper_func = python_profile(
                  nd_forward_backward_and_profile
              )
          else:
              benchmark_helper_func = python_profile(
                  nd_forward_and_profile
              )
      else:
          raise ValueError(
              "Incorrect input for profiler. Valid input - 'python' or 'native'"
          )
  
      # Warm up, ignore the profiler output
      _, _ = benchmark_helper_func(op, warmup, **kwargs_list[0])
  
      # Run Benchmarks
      op_benchmark_result = {op.__name__: []}
      logging.info(f"Begin Benchmark - {op.__name__}")
  
      for idx, kwargs in enumerate(kwargs_list):
          _, profiler_output = benchmark_helper_func(op, runs, **kwargs)
  
          # Add inputs used for profiling this operator into result
          # parse input if it contains ndarray, replace with shape info for better markdown readability
          new_inp = parse_input_ndarray(inputs[idx])
          profiler_output = merge_map_list(
              [{"inputs": new_inp}] + [profiler_output]
          )
          op_benchmark_result[op.__name__].append(profiler_output)
      logging.info(f"Complete Benchmark - {op.__name__}")
      return op_benchmark_result
  
file_path: mxnet/benchmark/opperf/utils/benchmark_utils.py
imports: import logging
  import inspect
  import mxnet
  from mxnet import nd
  from mxnet import np
  from .ndarray_utils import get_mx_ndarray, nd_forward_and_profile, nd_forward_backward_and_profile
  from .common_utils import merge_map_list
  from .op_registry_utils import prepare_op_inputs
  from benchmark.opperf.rules.default_params import PARAMS_OF_TYPE_NDARRAY, PARAMS_OF_TYPE_NP_ARRAY
  from .profiler_utils import cpp_profile, python_profile
label_desc: Use image node_id 5 for calling a global function with example usage: _run_operator_performance_test(op, inputs, run_backward, warmup, runs, kwargs_list, profiler) and returns: op_benchmark_result