code: def bench(func, mplib=fiber):
      """Benchmark func with a multiprocessing lib: fiber or multiprocessiong."""
      start_time = time.time()
      func(mplib)
      end_time = time.time()
      duration = end_time - start_time
      msg_per_sec = NUM / duration
  
      doc = func.__doc__.strip() if func.__doc__ is not None else ""
      print(
          "Benchmark result - {} - {}\n{}".format(
              func.__name__, mplib.__name__, doc
          )
      )
      print("Duration: {}".format(duration))
      print("Messages Per Second: {}".format(msg_per_sec))
      print(
          "Effective Data Rate: {} Mbps".format(
              msg_per_sec * len(MSG) * 8 / 1e6
          )
      )
  
file_path: fiber/examples/bench_queue.py
imports: import sys
  import time
  import fiber
  import multiprocessing
  from threading import Thread
  from fiber import SimpleQueue
  from datetime import datetime
  import logging
  import time
  import random
label_desc: Use image node_id 4 for calling a global function with example usage: bench(func, mplib) without return types