code: def do_runs(nlist, t=0, f=wait, trials=2, runner=time_throughput):
      A = np.zeros((len(nlist), 2))
      for i, n in enumerate(nlist):
          t1 = t2 = 0
          for _ in range(trials):
              time.sleep(0.25)
              ts = runner(n, t, f)
              t1 += ts[0]
              t2 += ts[1]
          t1 /= trials
          t2 /= trials
          A[i] = (t1, t2)
          A[i] = n / A[i]
          print(n, A[i])
      return A
  
file_path: ipyparallel/examples/throughput.py
imports: import time
  import numpy
  import ipyparallel
label_desc: Use image node_id 4 for calling a global function with example usage: do_runs(nlist, t, f, trials, runner) and returns: A