code: def __init__(self, comm):
      rank = comm.Get_rank()
      itemsize = MPI.INT.Get_size()
      if rank == 0:
          n = 1
      else:
          n = 0
      self.win = MPI.Win.Allocate(
          n * itemsize, itemsize, MPI.INFO_NULL, comm
      )
      if rank == 0:
          mem = self.win.tomemory()
          mem[:] = _struct.pack("i", 0)
  
file_path: mpi4py/demo/nxtval/nxtval-mpi3.py
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)