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.
code: def _check_ready_to_allreduce(self, array_a, array_b):
      my_shapes = (
          (
              None if array_a is None else array_a.shape,
              None if array_a is None else array_a.dtype,
          ),
          array_b.shape,
          array_b.dtype,
      )
      all_shapes = self.gather_obj((self.rank, my_shapes))
      if self.rank == 0:
          for rank, shapes in all_shapes:
              if my_shapes != shapes:
                  raise ValueError(
                      "Shape does not match: {}"
                      " at rank 0 while {} at rank {}".format(
                          my_shapes, shapes, rank
                      )
                  )
  
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 27 for calling the MpiCommunicatorBase obj's underlying member method code with example usage: obj._check_ready_to_allreduce(array_a, array_b) without return types