code: def get_device_of_sequence(
      values: Sequence[Union[Tensor, float]]
  ) -> torch.dtype:
      """
      CPU if everything is on the CPU; Cuda otherwise.
  
      Numbers (non-tensors) are considered to be on the CPU.
      """
  
      def _is_cuda(value: Union[Tensor, float]) -> bool:
          return hasattr(
              value, "device"
          ) and value.device == torch.device("cuda")
  
      any_cuda = any(_is_cuda(value) for value in values)
      return torch.device("cuda") if any_cuda else torch.device("cpu")
  
file_path: botorch/botorch/acquisition/fixed_feature.py
imports: from __future__ import annotations
  from numbers import Number
  from typing import List, Optional, Sequence, Union
  import torch
  from botorch.acquisition.acquisition import AcquisitionFunction
  from torch import Tensor
  from torch.nn import Module
label_desc: Use image node_id 2 for calling a global function with example usage: get_device_of_sequence(values) and returns: unknown, unknown