code: def main():
      for name, fn in [
          ("sequential", sequential),
          ("threads", with_thread_pool_executor),
          ("processes", with_process_pool_executor),
          ("mpi4py", with_mpi_pool_executor),
      ]:
          sys.stdout.write("%s: " % name.ljust(11))
          sys.stdout.flush()
          start = time.time()
          result = fn()
          if result is None:
              sys.stdout.write(" not available\n")
          elif result != [True] * len(PRIMES):
              sys.stdout.write(" failed\n")
          else:
              sys.stdout.write(
                  "%5.2f seconds\n" % (time.time() - start)
              )
          sys.stdout.flush()
  
file_path: mpi4py/demo/futures/perf_primes.py
imports: import sys
  import time
  import math
  from mpi4py.futures import MPIPoolExecutor
label_desc: Use image node_id 6 for calling a global function with example usage: main() without return types