code: def testBcastTypeIndexed(self):
      size = self.COMM.Get_size()
      rank = self.COMM.Get_rank()
      for array, typecode in arrayimpl.loop():
          datatype = array.TypeMap[typecode]
          for root in range(size):
              #
              if rank == root:
                  buf = array(range(10), typecode).as_raw()
              else:
                  buf = array(-1, typecode, 10).as_raw()
              indices = list(range(0, len(buf), 2))
              newtype = datatype.Create_indexed_block(1, indices)
              newtype.Commit()
              newbuf = (buf, 1, newtype)
              StartWaitFree(self.COMM.Bcast_init(newbuf, root=root))
              newtype.Free()
              if rank != root:
                  for i, value in enumerate(buf):
                      check = arrayimpl.scalar(-1 if (i % 2) else i)
                      self.assertEqual(value, check)
  
              #
              if rank == root:
                  buf = array(range(10), typecode).as_raw()
              else:
                  buf = array(-1, typecode, 10).as_raw()
              indices = list(range(1, len(buf), 2))
              newtype = datatype.Create_indexed_block(1, indices)
              newtype.Commit()
              newbuf = (buf, 1, newtype)
              StartWaitFree(self.COMM.Bcast_init(newbuf, root))
              newtype.Free()
              if rank != root:
                  for i, value in enumerate(buf):
                      check = arrayimpl.scalar(-1 if not (i % 2) else i)
                      self.assertEqual(value, check)
  
imports: from mpi4py import MPI
  import mpiunittest
  import arrayimpl
  from functools import reduce
label_desc: Use image node_id 14 for calling the BaseTestCCOBuf obj's underlying member method code with example usage: obj.testBcastTypeIndexed() without return types