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