code: def _get_onnx_devices(
      values: Tuple[
          Union[
              torch.Tensor,
              torch.SymInt,
              int,
              torch.SymFloat,
              float,
              torch.SymBool,
              bool,
          ],
          ...,
      ]
  ) -> Tuple["ORTC.OrtDevice", ...]:
      devices = tuple(
          value.device
          for value in values
          if isinstance(value, torch.Tensor)
      )
      if len(devices) == 0:
          devices = (torch.device("cpu"),)
  
      def _device_id_or_zero(device_id: int) -> int:
          return device_id or 0
  
      def _map_tensor_or_sym_to_device(
          value: Union[
              torch.Tensor,
              torch.SymInt,
              int,
              torch.SymFloat,
              float,
              torch.SymBool,
              bool,
          ],
          device: torch.device,
      ) -> int:
          if isinstance(value, torch.Tensor):
              return ORTC.OrtDevice(
                  _get_ort_device_type(device.type),
                  ORTC.OrtDevice.default_memory(),
                  _device_id_or_zero(device.index),
              )
          elif isinstance(
              value,
              (
                  torch.SymInt,
                  int,
                  torch.SymFloat,
                  float,
                  torch.SymBool,
                  bool,
              ),
          ):
              return ORTC.OrtDevice(
                  _get_ort_device_type("cpu"),
                  ORTC.OrtDevice.default_memory(),
                  0,
              )
          else:
              raise ValueError(
                  "Unsupported value type: " + str(type(value))
              )
  
      ort_devices = tuple(
          _map_tensor_or_sym_to_device(value, devices[0])
          for value in values
      )
      return ort_devices
  
imports: import dataclasses
  import importlib
  import logging
  from typing import Any, Dict, Final, List, Mapping, Optional, Sequence, Set, Tuple, Union
  from typing_extensions import TypeAlias
  import torch
  import torch._C
  import torch._ops
  import torch._prims.executor
  import torch.fx
  from torch._subclasses.fake_tensor import FakeTensor
  from torch.fx._compatibility import compatibility
  from torch.fx.passes.fake_tensor_prop import FakeTensorProp
  from torch.fx.passes.operator_support import OperatorSupport
  from torch.fx.passes.tools_common import CALLABLE_NODE_OPS
  from torch.utils import _pytree
label_desc: Use image node_id 12 for calling a global function with example usage: _get_onnx_devices(values) and returns: ort_devices, unknown, ORTC, ORTC