code: def next(self):
      incr = array("i", [1])
      ival = array("i", [0])
      self.comm.Send([incr, MPI.INT], 0, 0)
      self.comm.Recv([ival, MPI.INT], 0, 0)
      nxtval = ival[0]
      return nxtval
  
file_path: mpi4py/demo/nxtval/nxtval-threads.py
imports: from mpi4py import MPI
  from array import array
  from threading import Thread
label_desc: Use image node_id 4 for calling the Counter obj's underlying member method code with example usage: obj.next() and returns: nxtval