class_docstr: MpiCommunicatorBase
  
  Implementation of communicator interface defined by
  :class:`CommunicatorBase`. This communicator assumes MPI4py and
  all ChainerMN processes are invoked by ``mpirun`` (``mpiexec``)
  command. Although this lacks several important methods such as
  ``multi_node_mean_grad`` to be impelmented with speficic algorithm. See
  hierarchical communicator or pure_nccl communicator for example.
docstr: Compute mean of each element on each processes.
  
  The function compute mean of each element in ``sendbuf`` on each
  processes. The result is stored in ``recvbuf``.
  
  If ``sendbuf`` is ``None``, the function compute mean of each element
  in ``recvbuf`` on each processes and replaces ``recvbuf` with the
  computed mean.
  
  Args:
      sendbuf (numpy/cupy array): Input arrays.
      recvbuf (numpy/cupy array): Output arrays.
docstr_tok: ["Compute","mean","of","each","element","on","each","processes",".","The","function","compute","mean","of","each","element","in","``","sendbuf","``","on","each","processes",".","The","result","is","stored","in","``","recvbuf","``",".","If","``","sendbuf","``","is","``","None","``",",","the","function","compute","mean","of","each","element","in","``","recvbuf","``","on","each","processes","and","replaces","``","recvbuf","`","with","the","computed","mean",".","Args",":","sendbuf","(","numpy\/cupy","array",")",":","Input","arrays",".","recvbuf","(","numpy\/cupy","array",")",":","Output","arrays","."]
code: def _multi_node_mean(self, sendbuf, recvbuf):
      """Compute mean of each element on each processes.
  
      The function compute mean of each element in ``sendbuf`` on each
      processes. The result is stored in ``recvbuf``.
  
      If ``sendbuf`` is ``None``, the function compute mean of each element
      in ``recvbuf`` on each processes and replaces ``recvbuf` with the
      computed mean.
  
      Args:
          sendbuf (numpy/cupy array): Input arrays.
          recvbuf (numpy/cupy array): Output arrays.
  
      """
  
      if chainer.is_debug():
          self._check_ready_to_allreduce(sendbuf, recvbuf)
  
      is_float16 = recvbuf.dtype == numpy.float16
      if sendbuf is None:
          buffer_a = mpi4py.MPI.IN_PLACE
      elif is_float16:
          assert sendbuf.dtype == recvbuf.dtype
          buffer_a = _memory_utility.array_to_buffer_object(
              sendbuf.astype(numpy.float32)
          )
      else:
          buffer_a = _memory_utility.array_to_buffer_object(sendbuf)
  
      if is_float16:
          array_b32 = recvbuf.astype(numpy.float32)
      else:
          array_b32 = recvbuf
      buffer_b = _memory_utility.array_to_buffer_object(array_b32)
  
      self.mpi_comm.Allreduce(buffer_a, buffer_b)
  
      if is_float16:
          recvbuf[...] = array_b32.astype(numpy.float16)
  
      recvbuf *= 1.0 / self.mpi_comm.size
  
      if chainer.is_debug():
          self._ensure_all_finite(recvbuf)
  
imports: import mpi4py
  import numpy
  import chainer
  import chainer.backends
  import chainer.utils
  from chainer.utils import collections_abc
  from chainermn.communicators import _communication_utility
  from chainermn.communicators._communication_utility import chunked_bcast_obj
  from chainermn.communicators import _memory_utility
  from chainermn.communicators import communicator_base
  import chainerx
label_desc: Use image node_id 29 for calling the MpiCommunicatorBase obj's underlying member method code with example usage: obj._multi_node_mean(sendbuf, recvbuf) without return types