code: def test_raises_on_old_pytorch():
      import torch
  
      scaler = PyTorchGradScaler(enabled=True)
      with pytest.raises(ValueError, match=r"not supported.*1.9.0"):
          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 4 for calling a global function with example usage: test_raises_on_old_pytorch() without return types