code: def run_onnx_model(
      onnx_model: str, input_tensors: List[np.ndarray], device: Device
  ) -> List[np.ndarray]:
      from nebullvm.optional_modules.onnxruntime import (
          onnxruntime as ort,
      )
  
      if (
          device.type is DeviceType.GPU
          and len(ONNX_PROVIDERS["cuda"]) == 3
      ):
          ONNX_PROVIDERS["cuda"][1] = (
              "CUDAExecutionProvider",
              {
                  "device_id": device.idx,
              },
          )
  
      model = ort.InferenceSession(
          onnx_model,
          providers=ONNX_PROVIDERS["cuda"][1:]
          if device.type is DeviceType.GPU
          else ONNX_PROVIDERS["cpu"],
      )
      inputs = {
          name: array
          for name, array in zip(
              get_input_names(onnx_model), input_tensors
          )
      }
      res = model.run(
          output_names=get_output_names(onnx_model), input_feed=inputs
      )
      return list(res)
  
file_path: nebuly/optimization/nebullvm/nebullvm/tools/onnx.py
imports: from typing import List, Tuple, Any, Optional, Dict
  import numpy
  from loguru import logger
  from nebullvm.config import ONNX_PROVIDERS
  from nebullvm.core.models import DeepLearningFramework, Device, DeviceType, InputInfo, DataType
  from nebullvm.optional_modules.onnx import onnx
  from nebullvm.optional_modules.onnxruntime import onnxruntime
  from nebullvm.optional_modules.tensorflow import tensorflow
  from nebullvm.optional_modules.torch import torch
label_desc: Use image node_id 5 for calling a global function with example usage: run_onnx_model(onnx_model, input_tensors, device) and returns: list