code: def testExscan(self):
      size = self.COMM.Get_size()
      rank = self.COMM.Get_rank()
      for array, typecode in arrayimpl.loop():
          for op in (MPI.SUM, MPI.PROD, MPI.MAX, MPI.MIN):
              if skip_op(typecode, op):
                  continue
              sbuf = array(range(size), typecode)
              rbuf = array(0, typecode, size)
              try:
                  self.COMM.Exscan(sbuf.as_mpi(), rbuf.as_mpi(), op)
              except NotImplementedError:
                  self.skipTest("mpi-exscan")
              if rank == 1:
                  for i, value in enumerate(rbuf):
                      self.assertEqual(value, i)
              elif rank > 1:
                  max_val = maxvalue(rbuf)
                  for i, value in enumerate(rbuf):
                      if op == MPI.SUM:
                          if (i * rank) < max_val:
                              self.assertAlmostEqual(value, i * rank)
                      elif op == MPI.PROD:
                          if (i**rank) < max_val:
                              self.assertAlmostEqual(value, i**rank)
                      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 13 for calling the BaseTestCCOBuf obj's underlying member method code with example usage: obj.testExscan() without return types