code: def _test_optim(
      self, tinygrad_optim, torch_optim, steps, opts, atol, rtol
  ):
      for x, y in zip(
          step(Tensor, tinygrad_optim, steps, **opts),
          step(torch.tensor, torch_optim, steps, **opts),
      ):
          np.testing.assert_allclose(x, y, atol=atol, rtol=rtol)
  
imports: import numpy
  import torch
  import unittest
  from tinygrad import Tensor, Device
  from tinygrad.nn.optim import Adam, SGD, AdamW
  from tinygrad.helpers import CI
label_desc: Use image node_id 1 for calling the TestOptim obj's underlying member method code with example usage: obj._test_optim(tinygrad_optim, torch_optim, steps, opts, atol, rtol) without return types