code: def test_torch_tensorrt():
      model = models.resnet18()
      input_data = [
          ((torch.randn(1, 3, 256, 256),), 0) for i in range(100)
      ]
  
      # Run nebullvm optimization in one line of code
      optimized_model = optimize_model(
          model,
          input_data=input_data,
          ignore_compilers=[
              compiler
              for compiler in COMPILER_LIST
              if compiler != "tensor_rt"
          ],
          ignore_compressors=[
              compressor for compressor in COMPRESSOR_LIST
          ],
      )
  
      # Try the optimized model
      x = torch.randn(1, 3, 256, 256).cuda()
      model.cuda().eval()
      res_original = model(x)
      res_optimized = optimized_model(x)[0]
  
      assert isinstance(
          optimized_model, PytorchTensorRTInferenceLearner
      ) or isinstance(
          optimized_model, PytorchONNXTensorRTInferenceLearner
      )
      assert torch.max(abs((res_original - res_optimized))) < 1e-2
  
imports: import cpuinfo
  from tempfile import TemporaryDirectory
  import pytest
  import torch
  import torchvision.models
  from nebullvm.config import COMPILER_LIST, COMPRESSOR_LIST
  from nebullvm.operations.inference_learners.blade_disc import BladeDISCInferenceLearner
  from nebullvm.operations.inference_learners.onnx import PytorchONNXInferenceLearner
  from nebullvm.operations.inference_learners.openvino import PytorchOpenVinoInferenceLearner
  from nebullvm.operations.inference_learners.tensor_rt import PytorchTensorRTInferenceLearner, PytorchONNXTensorRTInferenceLearner
  from nebullvm.operations.inference_learners.torch_dynamo import TorchDynamoInferenceLearner
  from nebullvm.operations.inference_learners.torchscript import TorchScriptInferenceLearner
  from nebullvm.operations.inference_learners.tvm import PytorchApacheTVMInferenceLearner
  from nebullvm.operations.optimizations.compilers.utils import tvm_is_available, bladedisc_is_available
  from speedster import optimize_model, load_model
  from nebullvm.tools.utils import check_module_version
label_desc: Use image node_id 5 for calling a global function with example usage: test_torch_tensorrt() without return types