code: def verify_runtime(
      model, output, input_examples, input_names, check_tolerance=0.01
  ):
      onnx_model = onnx.load(output)
      ort_input_names = [node.name for node in onnx_model.graph.input]
  
      global ort_available
      if not ort_available:
          logging.warning(
              f"ONNX generated at {output}, not verified - please install onnxruntime_gpu package.\n"
          )
          onnx.checker.check_model(onnx_model, full_check=True)
          return
      onnx_session_opt = onnxruntime.SessionOptions()
      onnx_session_opt.graph_optimization_level = (
          onnxruntime.GraphOptimizationLevel.ORT_ENABLE_BASIC
      )
      sess = onnxruntime.InferenceSession(
          onnx_model.SerializeToString(),
          sess_options=onnx_session_opt,
          providers=["CUDAExecutionProvider"],
      )
      del onnx_model
      all_good = True
      for input_example in input_examples:
          input_list, input_dict = parse_input_example(input_example)
          output_example = model.forward(*input_list, **input_dict)
          ort_input = to_onnxrt_input(
              ort_input_names, input_names, input_dict, input_list
          )
          all_good = all_good and run_ort_and_compare(
              sess, ort_input, output_example, check_tolerance
          )
      status = "SUCCESS" if all_good else "FAIL"
      logging.info(
          f"ONNX generated at {output} verified with onnxruntime : "
          + status
      )
      return all_good
  
imports: import os
  from contextlib import nullcontext
  from enum import Enum
  from typing import Callable, Dict, Optional, Type
  import onnx
  import torch
  import torch.nn
  import torch.nn.functional
  from nemo.utils import CastToFloat, CastToFloatAll, logging
label_desc: Use image node_id 8 for calling a global function with example usage: verify_runtime(model, output, input_examples, input_names, check_tolerance) and returns: all_good