code: def test_lr_step(self):
      opt = SGD()
  
      param = torch.tensor([0.0], requires_grad=True)
      opt.set_param_groups([param], lr=LinearParamScheduler(1, 2))
  
      param.grad = torch.tensor([1.0])
  
      self.assertAlmostEqual(opt.options_view.lr, 1.0)
  
      # lr=1, param should go from 0 to -1
      opt.step(where=0)
      self.assertAlmostEqual(opt.options_view.lr, 1.0)
  
      self.assertAlmostEqual(param.item(), -1.0, delta=1e-5)
  
      # lr=1.5, param should go from -1 to -1-1.5 = -2.5
      opt.step(where=0.5)
      self.assertAlmostEqual(param.item(), -2.5, delta=1e-5)
  
      # lr=1.9, param should go from -2.5 to -1.9-2.5 = -4.4
      opt.step(where=0.9)
      self.assertAlmostEqual(param.item(), -4.4, delta=1e-5)
  
file_path: ClassyVision/test/optim_sgd_test.py
imports: import unittest
  import torch
  from classy_vision.optim.param_scheduler import LinearParamScheduler
  from classy_vision.optim.sgd import SGD
  from test.generic.optim_test_util import TestOptimizer
label_desc: Use image node_id 3 for calling the TestSGDOptimizer obj's underlying member method code with example usage: obj.test_lr_step() without return types