code: def bench_spark_seq(
      tasks, workers, task_duration, warmup=True, sc=None
  ):
      if warmup:
          pyspark_parallel(sc, tasks, task_duration)
  
      res, elapsed = timeit(
          pyspark_parallel_seq, sc, tasks, task_duration, workers
      )
  
      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 11 for calling a global function with example usage: bench_spark_seq(tasks, workers, task_duration, warmup, sc) and returns: elapsed