code: def update(self, weight, grad, state, learning_rate):
      lr = learning_rate
      # do the regular sgd update flow
      kwargs = {"rescale_grad": self.rescale_grad}
      if self.momentum > 0:
          kwargs["momentum"] = self.momentum
      if state is not None:
          nd.sgd_mom_update(
              weight,
              grad,
              state,
              out=weight,
              lr=lr,
              wd=self.wd,
              **kwargs,
          )
      else:
          raise ValueError
  
file_path: insightface/recognition/partial_fc/mxnet/optimizer.py
imports: import horovod.mxnet
  import mxnet
  from mxnet import nd
label_desc: Use image node_id 2 for calling the MemoryBankSGDOptimizer obj's underlying member method code with example usage: obj.update(weight, grad, state, learning_rate) without return types