code: def testAllreduce(self):
      size = self.COMM.Get_size()
      rank = self.COMM.Get_rank()
      for array, typecode in arrayimpl.loop():
          # segfault as of OpenMPI 4.1.1
          if unittest.is_mpi_gpu("openmpi", array):
              continue
          for op in (MPI.SUM, MPI.MAX, MPI.MIN, MPI.PROD):
              if skip_op(typecode, op):
                  continue
              buf = array(range(size), typecode)
              sbuf = MPI.IN_PLACE
              rbuf = buf.as_mpi()
              self.COMM.Iallreduce(sbuf, rbuf, op).Wait()
              max_val = maxvalue(buf)
              for i, value in enumerate(buf):
                  if op == MPI.SUM:
                      if (i * size) < max_val:
                          self.assertAlmostEqual(value, i * size)
                  elif op == MPI.PROD:
                      if (i**size) < max_val:
                          self.assertAlmostEqual(value, i**size)
                  elif op == MPI.MAX:
                      self.assertEqual(value, i)
                  elif op == MPI.MIN:
                      self.assertEqual(value, i)
  
imports: from mpi4py import MPI
  import mpiunittest
  import arrayimpl
  from functools import reduce
label_desc: Use image node_id 6 for calling the BaseTestCCOBufInplace obj's underlying member method code with example usage: obj.testAllreduce() without return types