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_obj_type_for_chainerx(self, obj):
      # Do NOT support chainerx ndarray with CUDA
      # for the following reason:
      # (1) mpi4py.send pickles the object
      # (2) chainerx.ndarray preserves CUDA
      # device internally when pickled
      # (3) An error will occur when an ndarray is unpickled in another
      #     process
      #
      if None is obj:
          return False
  
      # check collections of list, tuple and set
      elif type(obj) in [list, tuple, set]:
          for item in obj:
              xp = chainer.backend.get_array_module(item)
              # DO NOT use device.backend.name as
              # 'ChainerxDevice' object has no attribute 'backend'
              if xp == chainerx and item.device.name.startswith("cuda"):
                  return True
  
      # check dict
      elif type(obj) is dict:
          for key, value in obj.items():
              xp = chainer.backend.get_array_module(key)
              if xp == chainerx and key.device.name.startswith("cuda"):
                  return True
  
              xp = chainer.backend.get_array_module(value)
              if xp == chainerx and value.device.name.startswith(
                  "cuda"
              ):
                  return True
      else:
          xp = chainer.backend.get_array_module(obj)
          if xp == chainerx and obj.device.name.startswith("cuda"):
              return True
  
      return False
  
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 19 for calling the MpiCommunicatorBase obj's underlying member method code with example usage: obj._check_obj_type_for_chainerx(obj) and returns: False, False, True, True, True, True