code: def from_onnx(model):
      logging.info(
          "-------------------- BEGIN ONNX IMPORT --------------------"
      )
  
      filename = MODEL_PREFIX + model["filename"]
      logging.info(f"Loading ONNX model from {filename}")
  
      onnx_model = onnx.load(filename)
      logging.info(f"Loaded model from {filename}")
  
      mod, params = tvm.relay.frontend.from_onnx(
          onnx_model, model["input_shapes"], freeze_params=True
      )
      mod = tvm.relay.transform.InferType()(mod)
      logging.info(
          "-------------------- END ONNX IMPORT --------------------"
      )
  
      logging.info(f"Imported model:\n{mod}")
      logging.info(f"Params:\n{params}")
  
      return {
          "name": model["name"],
          "input_shapes": model["input_shapes"],
          "input_dtypes": model["input_dtypes"],
          "mod": mod,
          "params": params,
          "main_dtype": model["main_dtype"],
      }
  
imports: import tvm
  import onnx
  import numpy
  import logging
  import tvm.contrib.target.onnx
label_desc: Use image node_id 24 for calling a global function with example usage: from_onnx(model) and returns: dict