code: def verify_meta_schedule_with_tensorrt(
      mod,
      params,
      data_shape,
      use_trt: bool = True,
  ):
      # Build
      builder = LocalBuilder(
          f_build=build_relay_with_tensorrt if use_trt else build_relay,
          timeout_sec=1000,
      )
      builder_input = BuilderInput(mod, Target("cuda"), params)
      builder_result = builder.build([builder_input])[0]
      assert builder_result.error_msg is None, builder_result.error_msg
      assert builder_result.artifact_path is not None
  
      # Run
      runner_input = RunnerInput(
          builder_result.artifact_path,
          device_type="cuda",
          args_info=[TensorInfo("float32", data_shape)],
      )
      runner = LocalRunner(
          evaluator_config=EvaluatorConfig(
              number=5,
              repeat=2,
              min_repeat_ms=0,
              enable_cpu_cache_flush=False,
          ),
          f_run_evaluator=run_with_graph_executor,
      )
  
      # Run the module
      runner_future = runner.run([runner_input])[0]
      runner_result = runner_future.result()
      assert runner_result is not None
      assert runner_result.error_msg is None, runner_result.error_msg
      assert runner_result.run_secs is not None
  
      for result in runner_result.run_secs:
          if isinstance(result, FloatImm):
              result = result.value
          assert isinstance(result, float)
          assert result >= 0.0
  
file_path: tvm/tests/python/meta_schedule/test_meta_schedule_byoc_tensorrt.py
imports: import sys
  from typing import List
  import pytest
  import tvm
  import tvm.testing
  from tvm import relay
  from tvm.meta_schedule.arg_info import TensorInfo
  from tvm.meta_schedule.builder import BuilderInput, LocalBuilder
  from tvm.meta_schedule.runner import EvaluatorConfig, LocalRunner, RunnerInput
  from tvm.meta_schedule.testing.custom_builder_runner import build_relay, build_relay_with_tensorrt, run_with_graph_executor
  from tvm.meta_schedule.testing.relay_workload import get_network
  from tvm.relay import testing
  from tvm.relay.op.contrib import tensorrt
  from tvm.target import Target
  from tvm.tir import FloatImm
label_desc: Use image node_id 2 for calling a global function with example usage: verify_meta_schedule_with_tensorrt(mod, params, data_shape, use_trt) without return types