code: def test_mn_iterator(self):
      # Datasize is a multiple of batchsize.
      bs = 4
      iterator = chainermn.iterators.create_multi_node_iterator(
          self.iterator_class(
              self.dataset, batch_size=bs, shuffle=True
          ),
          self.communicator,
      )
  
      for e in range(3):
          for i in range(100):
              batch = iterator.next()
              if self.communicator.rank == 0:
                  for rank_from in range(1, self.communicator.size):
                      _batch = self.communicator.mpi_comm.recv(
                          source=rank_from
                      )
                      self.assertEqual(batch, _batch)
              else:
                  self.communicator.mpi_comm.ssend(batch, dest=0)
  
imports: import chainer
  import chainer.testing
  import chainer.testing.attr
  import chainermn
  from chainermn.iterators.multi_node_iterator import _build_ctrl_msg
  from chainermn.iterators.multi_node_iterator import _parse_ctrl_msg
  import numpy
  import platform
  import pytest
  from six.moves import range
  import unittest
label_desc: Use image node_id 2 for calling the TestMultiNodeIterator obj's underlying member method code with example usage: obj.test_mn_iterator() without return types