class_docstr: Interface definition of all communicators.
  
  All communicators that have compatible set of methods with this
  class is supposed to work in ChainerMN's parallel computation
  implementation. The methods are named after MPI functions, such
  as ``bcast()`` came from ``MPI_Bcast()``.
  
  There are two types of methods: one that treats Python objects
  have ``_obj`` suffix.  The other has methods without any suffix
  and it handles ndarray and arrays filled with scaler values.  So
  the number of methods would be ::
  
      [send, recv, bcast, gather, allreduce] * [ '_obj', '']
  
  
  (with single exception ``alltoall``, ``multi_node_mean_grad``, ``split``
  and ``bcast_data`` so far). Also methods are supposed to be
  written in this order. All those methods must be implemented in
  its implementation class, or otherwise it cannot be instantiated
  in runtime.
  
  .. note:: As most implementation of ``_obj``-sufficed methods
    involves Python object pickling and unpickling, there is an
    implicit size limit.
  
  TODO(kuenishi): as of now no implementation class actually has
  ``allreduce`` method.
docstr: A primitive of inter-process all-gather communication.
  
  This method tries to invoke all-gather communication within the
  communicator. All processes in the communicator are expected to
  invoke ``allgather()``. This method relies on mpi4py fast communication
  optimized for numpy arrays, as well as ``send()`` and ``recv()``.
  
  Note that this method can only handle the same shapes of data
  over all processes, and cannot handle tuple data.
  
  Args:
      x (numpy/cupy array): Array to be gathered.
  
  Returns:
      ys (tuple of numpy/cupy array): Received arrays.
docstr_tok: ["A","primitive","of","inter-process","all-gather","communication",".","This","method","tries","to","invoke","all-gather","communication","within","the","communicator",".","All","processes","in","the","communicator","are","expected","to","invoke","``","allgather","(",")","``",".","This","method","relies","on","mpi4py","fast","communication","optimized","for","numpy","arrays",",","as","well","as","``","send","(",")","``","and","``","recv","(",")","``",".","Note","that","this","method","can","only","handle","the","same","shapes","of","data","over","all","processes",",","and","can","not","handle","tuple","data",".","Args",":","x","(","numpy\/cupy","array",")",":","Array","to","be","gathered",".","Returns",":","ys","(","tuple","of","numpy\/cupy","array",")",":","Received","arrays","."]
code: def allgather(self, x):
      """A primitive of inter-process all-gather communication.
  
      This method tries to invoke all-gather communication within the
      communicator. All processes in the communicator are expected to
      invoke ``allgather()``. This method relies on mpi4py fast communication
      optimized for numpy arrays, as well as ``send()`` and ``recv()``.
  
      Note that this method can only handle the same shapes of data
      over all processes, and cannot handle tuple data.
  
      Args:
          x (numpy/cupy array): Array to be gathered.
  
      Returns:
          ys (tuple of numpy/cupy array): Received arrays.
      """
      raise NotImplementedError()
  
imports: from abc import ABCMeta
  from abc import abstractmethod
  import contextlib
  import six
  import warnings
label_desc: Use image node_id 16 for calling the CommunicatorBase obj's underlying member method code with example usage: obj.allgather(x) without return types