code: def _do_allreduce(self, index, grad):
      if hvd.size() == 1:
          return
  
      if isinstance(index, (tuple, list)):
          for i in range(len(index)):
              hvd.allreduce_(
                  grad[i],
                  average=False,
                  name=self._prefix + str(index[i]),
                  priority=-i,
              )
      else:
          hvd.allreduce_(
              grad, average=False, name=self._prefix + str(index)
          )
  
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 4 for calling the DistributedOptimizer obj's underlying member method code with example usage: obj._do_allreduce(index, grad) without return types