code: def test_raises_with_cpu_tensor():
      import torch
  
      scaler = PyTorchGradScaler(enabled=True)
      with pytest.raises(
          ValueError,
          match=r"Gradient scaling is only supported for CUDA tensors.",
      ):
          scaler.scale([torch.tensor([1.0], device="cpu")])
  
file_path: thinc/thinc/tests/shims/test_pytorch_grad_scaler.py
imports: import pytest
  from hypothesis import given, settings
  from hypothesis.strategies import lists, one_of, tuples
  from thinc.api import PyTorchGradScaler
  from thinc.compat import has_torch, has_torch_amp, has_torch_cuda_gpu, torch
  from thinc.util import is_torch_array
  from ..strategies import ndarrays
label_desc: Use image node_id 5 for calling a global function with example usage: test_raises_with_cpu_tensor() without return types