code: def test_invalid_weight_decay():
      weight = torch.randn(10, 5, requires_grad=True).float().cuda()
      bias = torch.randn(10, requires_grad=True).float().cuda()
      with pytest.raises(ValueError):
          Adam([weight, bias], lr=1e-2, weight_decay=-1)
  
imports: from copy import deepcopy
  import functools
  import pytest
  import torch
label_desc: Use image node_id 23 for calling a global function with example usage: test_invalid_weight_decay() without return types