code: def test_array_cuda(func, dev):
      """Test that a new Torch tensor created with math.array/math.eye preserves
      the Torch device"""
      if not torch.cuda.is_available() and dev == "cuda":
          pytest.skip(
              "A GPU would be required to run this test, but CUDA is not available."
          )
  
      original = torch.tensor(3, device=dev)
      new = func(2, like=original)
      assert isinstance(new, torch.Tensor)
      assert new.device == original.device
  
imports: import autoray
  import numpy
  import pytest
  import scipy
  from autoray import numpy
  from pennylane import math
  from pennylane import numpy
  from pennylane import grad
label_desc: Use image node_id 1 for calling a global function with example usage: test_array_cuda(func, dev) without return types