code: def free(self):
      self.comm.Barrier()
      # stop counter thread
      rank = self.comm.Get_rank()
      if rank == 0:
          self.comm.Send([None, MPI.INT], 0, 1)
          self.thread.join()
      #
      self.comm.Free()
  
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 3 for calling the Counter obj's underlying member method code with example usage: obj.free() without return types