class_docstr: Large-scale distributed sampling face recognition training Module, of course sampling is an option,
  There will be no loss of accuracy in sampling in large-scale identities training tasks, uses only
  8 NVIDIA RTX2080Ti to complete classification tasks with 10 millions of identities, 64 NVIDIA
  RTX2080Ti can complete classification tasks with 100 million of identities.
  
  See the original paper:
  https://arxiv.org/abs/2203.15565
  
  Parameters
  ----------
  symbol: Symbol
      Backbone symbol.
  fc7_model: Object
      Object of margin loss.
  memory_bank: Memory bank Object.
      Object of memory bank, which maintain local class centers and their momentum.
  memory_optimizer: Optimizer object.
      The updater of memory bank, default is sgd optimizer.
  logger:
docstr: Implement in-place AllGather using AllReduce
          
docstr_tok: ["Implement","in-place","AllGather","using","AllReduce"]
code: def allgather(self, tensor, name, shape, dtype, context):
      """Implement in-place AllGather using AllReduce"""
      assert isinstance(tensor, nd.NDArray), type(tensor)
      assert isinstance(name, str), type(name)
      assert isinstance(shape, tuple), type(shape)
      assert isinstance(dtype, str), type(dtype)
      assert isinstance(context, mx.context.Context), type(context)
      total_tensor = self.get_ndarray(
          context=context, name=name, shape=shape, dtype=dtype
      )
      total_tensor[
          :
      ] = 0  # reset array before all-reduce is very important
      total_tensor[
          self.rank * self.batch_size : self.rank * self.batch_size
          + self.batch_size
      ] = tensor
      hvd.allreduce_(total_tensor, average=False)  # all-reduce in-place
      return total_tensor
  
imports: import logging
  import warnings
  from collections import namedtuple
  import horovod.mxnet
  import mxnet
  import mxnet.ndarray
  import numpy
  from default import config
  from optimizer import DistributedOptimizer
label_desc: Use image node_id 10 for calling the SampleDistributeModule obj's underlying member method code with example usage: obj.allgather(tensor, name, shape, dtype, context) and returns: total_tensor