code: def build_relay_with_tensorrt(
      mod: "IRModule",
      target: "Target",
      params: Dict[str, "NDArray"],
  ) -> "Module":
      """Build a Relay IRModule with TensorRT BYOC
  
      Parameters
      ----------
      mod : IRModule
          The Relay IRModule to build.
  
      target : Target
          The target to build the module for.
  
      params : Dict[str, NDArray]
          The parameter dict to build the module with.
  
      Returns
      -------
      mod : runtime.Module
          The built module.
      """
      from tvm.ir.transform import PassContext
      from tvm.relay.build_module import (
          _build_module_no_factory as relay_build,
      )
      from tvm.relay.op.contrib import tensorrt
      from tvm.runtime import Module
  
      mod = tensorrt.partition_for_tensorrt(mod, params)
      with PassContext(opt_level=3):
          result = relay_build(
              mod, target=target, target_host=None, params=params
          )
      assert isinstance(result, Module)
      return result
  
imports: from typing import TYPE_CHECKING, Dict, List, Optional, Union, Callable
label_desc: Use image node_id 2 for calling a global function with example usage: build_relay_with_tensorrt(mod, target, params) and returns: result