def METHOD_NAME(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)