code: def onnx_inference(
      onnx_path: str, image: np.ndarray, num_images: int = 20
  ):
      # load onnx model
      ort_session = onnxruntime.InferenceSession(onnx_path)
  
      # compute onnx Runtime output prediction
      ort_inputs = {ort_session.get_inputs()[0].name: image}
  
      start = time.perf_counter()
      for _ in range(num_images):
          ort_session.run(None, ort_inputs)
      end = time.perf_counter()
      time_onnx = end - start
      print(
          f"ONNX model in Inference Engine/CPU: {time_onnx / num_images:.3f} "
          f"seconds per image, FPS: {num_images / time_onnx:.2f}"
      )
  
      return num_images / time_onnx
  
file_path: deep-learning-for-image-processing/deploying_service/deploying_pytorch/convert_openvino/convert_resnet34/compare_fps.py
imports: import time
  import numpy
  import torch
  import onnxruntime
  import matplotlib.pyplot
  from openvino.runtime import Core
  from torchvision.models import resnet34
label_desc: Use image node_id 2 for calling a global function with example usage: onnx_inference(onnx_path, image, num_images) and returns: unknown