code: def testScan(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)
              self.COMM.Scan(sbuf.as_mpi(), rbuf.as_mpi(), op)
              max_val = maxvalue(rbuf)
              for i, value in enumerate(rbuf):
                  if op == MPI.SUM:
                      if (i * (rank + 1)) < max_val:
                          self.assertAlmostEqual(value, i * (rank + 1))
                  elif op == MPI.PROD:
                      if (i ** (rank + 1)) < max_val:
                          self.assertAlmostEqual(value, i ** (rank + 1))
                  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 12 for calling the BaseTestCCOBuf obj's underlying member method code with example usage: obj.testScan() without return types