code: def build_engine_onnx(self, model_file):
      with trt.Builder(TRT_LOGGER) as builder, builder.create_network(
          flags=1
      ) as network, trt.OnnxParser(network, TRT_LOGGER) as parser:
          builder_config = builder.create_builder_config()
          builder_config.max_workspace_size = 1 << 33
          with open(model_file, "rb") as model:
              if not parser.parse(model.read()):
                  for error in range(parser.num_errors):
                      self.fail(
                          "ERROR: {}".format(parser.get_error(error))
                      )
          return builder.build_engine(network, builder_config)
  
imports: import os
  import unittest
  from PIL import Image
  import numpy
  import torch
  import torchvision.models
  import pycuda.driver
  import pycuda.autoinit
  import tensorrt
label_desc: Use image node_id 3 for calling the Test_PT_ONNX_TRT obj's underlying member method code with example usage: obj.build_engine_onnx(model_file) and returns: builder