code: def test_extract_device_dtype(
      tensor_list, out_device, out_dtype, will_throw_error
  ):
      # TODO: include the warning in another way - possibly loggers.
      # Add GPU tests when GPU testing available
      # if torch.cuda.is_available():
      #     import warnings
      #     warnings.warn("Add GPU tests.")
  
      if will_throw_error:
          with pytest.raises(ValueError):
              _extract_device_dtype(tensor_list)
      else:
          device, dtype = _extract_device_dtype(tensor_list)
          assert device == out_device
          assert dtype == out_dtype
  
imports: import pytest
  import torch
  from kornia.testing import assert_close
  from kornia.utils import _extract_device_dtype
  from kornia.utils.helpers import _torch_histc_cast, _torch_inverse_cast, _torch_solve_cast, _torch_svd_cast, safe_inverse_with_mask, safe_solve_with_mask
label_desc: Use image node_id 1 for calling a global function with example usage: test_extract_device_dtype(tensor_list, out_device, out_dtype, will_throw_error) without return types