code: def get_onnx_model(
      model_name, batch_size, qconfig, original=False, dataset=None
  ):
      assert model_name == "vit32", "Only support vit32 model!"
      base = "https://github.com/TheGreatCold/tvm-vit/raw/d2aa1e60eef42e2fdedbd1e13aa85ac5faf0a7fc"
      logfile = "gtx1660_vit_B32_224.log"
      onnx_path = "vit_B32_224.onnx"
  
      download_file(base, logfile)
      download_file(base, onnx_path)
  
      onnx_graph = onnx.load(open(onnx_path, "rb"))
      data_shape = (batch_size, 3, 224, 224)
      mod, params = relay.frontend.from_onnx(
          onnx_graph, {"data": data_shape}
      )
  
      with tvm.transform.PassContext(opt_level=3):
          qfunc = relay.quantize.prerequisite_optimize(
              mod, params=params
          )
      logging.debug("original")
      logging.debug(qfunc.astext(show_meta_data=False))
      if original:
          return qfunc, params, logfile
  
      with qconfig:
          logging.debug("current quantize config")
          logging.debug(qtz.current_qconfig())
  
          if dataset is not None:
              with tvm.target.cuda():
                  with tvm.autotvm.apply_history_best(logfile):
                      qfunc = qtz.quantize(
                          qfunc, params, dataset=dataset
                      )
          else:
              qfunc = qtz.quantize(qfunc, params)
  
          logging.debug("after quantize")
          logging.debug(qfunc.astext(show_meta_data=False))
      return qfunc, params, logfile
  
file_path: tvm/tests/python/nightly/quantization/test_quantization_accuracy_for_vit.py
imports: import os
  import sys
  import logging
  import pytest
  import onnx
  import tvm
  from tvm import relay
  from tvm.relay import quantize
  import tvm.testing
  from test_quantization_accuracy import Config, get_val_data, eval_acc
label_desc: Use image node_id 3 for calling a global function with example usage: get_onnx_model(model_name, batch_size, qconfig, original, dataset) and returns: qfunc,  params,  logfile, qfunc,  params,  logfile