code: def test_invalid_momentum():
      weight = torch.randn(10, 5).float().cuda().requires_grad_()
      bias = torch.randn(10).float().cuda().requires_grad_()
      with pytest.raises(ValueError):
          MADGRAD([weight, bias], lr=1e-2, momentum=1.0)
  
file_path: madgrad/tests/test_madgrad.py
imports: import pytest
  import torch
  from madgrad import MADGRAD
label_desc: Use image node_id 2 for calling a global function with example usage: test_invalid_momentum() without return types