code: def test_betas_validation(optimizer_class):
      betas = (-1, 0.999)
      with pytest.raises(ValueError) as ctx:
          optimizer_class(None, lr=0.1, betas=(-1, 0.999))
      msg = "Invalid beta parameter at index 0: {}".format(betas[0])
      assert msg in str(ctx.value)
  
      betas = (0.9, -0.999)
      with pytest.raises(ValueError) as ctx:
          optimizer_class(None, lr=0.1, betas=betas)
      msg = "Invalid beta parameter at index 1: {}".format(betas[1])
      assert msg in str(ctx.value)
  
file_path: pytorch-optimizer/tests/test_param_validation.py
imports: import pytest
  import torch
  import torch_optimizer
label_desc: Use image node_id 6 for calling a global function with example usage: test_betas_validation(optimizer_class) without return types