code: def __init__(self, comm):
      #
      size = comm.Get_size()
      rank = comm.Get_rank()
      #
      itemsize = MPI.INT.Get_size()
      if rank == 0:
          mem = MPI.Alloc_mem(itemsize * size, MPI.INFO_NULL)
          mem[:] = _struct.pack("i", 0) * size
      else:
          mem = MPI.BOTTOM
      self.win = MPI.Win.Create(mem, itemsize, MPI.INFO_NULL, comm)
      #
      blens = [rank, size - rank - 1]
      disps = [0, rank + 1]
      self.dt_get = MPI.INT.Create_indexed(blens, disps).Commit()
      #
      self.myval = 0
  
imports: from mpi4py import MPI
  from array import array
  import struct
label_desc: Use image node_id 1 to create a new Counter object  with example: obj = Counter(comm)