code: def test():
      vals = []
      counter = Counter(MPI.COMM_WORLD)
      for i in range(5):
          c = counter.next()
          vals.append(c)
      counter.free()
      #
      vals = MPI.COMM_WORLD.allreduce(vals)
      assert sorted(vals) == list(range(len(vals)))
  
imports: from mpi4py import MPI
  import sys, os
label_desc: Use image node_id 2 for calling a global function with example usage: test() without return types