code: def test_duped_weights(self):
      for Opt in [Adam, AdamW, SGD]:
          losses = []
          for i in range(2):
              w = Tensor(x_init.copy())
              opt = Opt([w], lr=0.1) if i == 0 else Opt([w, w], lr=0.1)
  
              loss = None
              for _ in range(3):
                  loss = w.sum()
                  opt.zero_grad()
                  loss.backward()
                  opt.step()
              losses.append(loss.numpy())
  
          np.testing.assert_allclose(
              losses[0], losses[1], atol=1e-4, rtol=0
          )
  
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 31 for calling the TestOptim obj's underlying member method code with example usage: obj.test_duped_weights() without return types