code: def bench_mp_seq(
      tasks, workers, task_duration, warmup=True, pool=None
  ):
      def run(pool, duration):
          res = [None] * workers
          for i in range(tasks // workers):
              for j in range(workers):
                  handle = pool.apply_async(sleep_worker, (duration,))
                  res[j] = handle
              for j in range(workers):
                  res[j].get()
  
      if warmup:
          if not pool:
              pool = mp.Pool(workers)
          pool.map(
              sleep_worker,
              [task_duration for x in range(tasks)],
              chunksize=1,
          )
          logger.debug("warm up finished")
  
      res, elapsed = timeit(run, pool, task_duration)
  
      return elapsed
  
imports: import time
  import fiber
  import multiprocessing
  import logging
  import subprocess
  import argparse
  from pprint import pprint
label_desc: Use image node_id 7 for calling a global function with example usage: bench_mp_seq(tasks, workers, task_duration, warmup, pool) and returns: elapsed