code: def test_run_relay_module__benchmarking(
      use_vm,
      benchmark,
      repeat,
      number,
      expected_len,
      relay_text_conv2d,
      relay_compile_model,
  ):
      """Check the length of the results from benchmarking is what is expected by expected_len."""
      shape_dict = {"data": (1, 3, 64, 64), "weight": (3, 3, 5, 5)}
      input_dict = {
          "data": np.random.randint(
              low=0, high=10, size=shape_dict["data"], dtype="uint8"
          ),
          "weight": np.random.randint(
              low=0, high=10, size=shape_dict["weight"], dtype="int8"
          ),
      }
  
      tflite_compiled_model = relay_compile_model(
          relay_text_conv2d, shape_dict=shape_dict, use_vm=use_vm
      )
      result = tvmc.run(
          tflite_compiled_model,
          inputs=input_dict,
          hostname=None,
          device="cpu",
          benchmark=benchmark,
          repeat=repeat,
          number=number,
      )
  
      # When no benchmarking is used, an empty list is used to
      # represent an absence of results.
      if isinstance(result.times, list):
          assert len(result.times) == expected_len
      else:
          assert len(result.times.results) == expected_len
  
file_path: tvm/tests/python/driver/tvmc/test_runner.py
imports: import pytest
  import numpy
  from tvm import rpc
  from tvm.driver import tvmc
  from tvm.driver.tvmc.model import TVMCResult
  from tvm.driver.tvmc.result_utils import get_top_results
  from tvm.runtime.module import BenchmarkResult
label_desc: Use image node_id 9 for calling a global function with example usage: test_run_relay_module__benchmarking(use_vm, benchmark, repeat, number, expected_len, relay_text_conv2d, relay_compile_model) without return types