code: def step(self) -> None:
      for i, t in enumerate(self.params):
          assert t.grad is not None
          # this is needed since the grads can form a "diamond"
          # TODO: fix this in lazy.py
          t.grad.realize()
          g = t.grad + self.wd * t.detach()
          if self.momentum:
              self.b[i].assign(
                  self.momentum * self.b[i] + g
              )  # NOTE: self.b[i] is zero on the first run, no if required
              g = (
                  (g + self.momentum * self.b[i])
                  if self.nesterov
                  else self.b[i]
              )
          t.assign(t.detach() - g * self.lr)
      self.realize(self.b)
  
file_path: tinygrad/tinygrad/nn/optim.py
imports: from typing import List
  from tinygrad.helpers import dedup, getenv
  from tinygrad.tensor import Tensor
label_desc: Use image node_id 2 for calling the SGD obj's underlying member method code with example usage: obj.step() without return types