code: def run_during(duration, func):
      _t = time.time
      n = 0
      start = os.times()
      start_timestamp = _t()
      real_start = start[4] or start_timestamp
      while True:
          func()
          n += 1
          if _t() - start_timestamp > duration:
              break
      end = os.times()
      real = (end[4] if start[4] else time.time()) - real_start
      return n, real, sum(end[0:2]) - sum(start[0:2])
  
imports: import itertools
  import os
  import platform
  import re
  import sys
  import time
  from optparse import OptionParser
label_desc: Use image node_id 27 for calling a global function with example usage: run_during(duration, func) and returns: n,  real,  unknown