code: def ir_inference(
      ir_path: str, image: np.ndarray, num_images: int = 20
  ):
      # Load the network in Inference Engine
      ie = Core()
      model_ir = ie.read_model(model=ir_path)
      compiled_model_ir = ie.compile_model(
          model=model_ir, device_name="CPU"
      )
  
      # Get input and output layers
      input_layer_ir = next(iter(compiled_model_ir.inputs))
      output_layer_ir = next(iter(compiled_model_ir.outputs))
  
      start = time.perf_counter()
      request_ir = compiled_model_ir.create_infer_request()
      for _ in range(num_images):
          request_ir.infer(inputs={input_layer_ir.any_name: image})
      end = time.perf_counter()
      time_ir = end - start
      print(
          f"IR model in Inference Engine/CPU: {time_ir / num_images:.3f} "
          f"seconds per image, FPS: {num_images / time_ir:.2f}"
      )
  
      return num_images / time_ir
  
file_path: deep-learning-for-image-processing/deploying_service/deploying_pytorch/convert_openvino/convert_yolov5/compare_fps.py
imports: import time
  import numpy
  import torch
  import onnxruntime
  import matplotlib.pyplot
  from openvino.runtime import Core
label_desc: Use image node_id 3 for calling a global function with example usage: ir_inference(ir_path, image, num_images) and returns: unknown