code: def run_benchmark(
      module, function, setup_suffix="", repeat=5, number=1000
  ):
      setup_func = "setup_" + function
      if setup_suffix:
          print("%s with %s:" % (function, setup_suffix), end="")
          setup_func += "_" + setup_suffix
      else:
          print("%s:" % function, end="")
  
      def wrapper(function, setup_func):
          function = globals()[function]
          setup_func = globals()[setup_func]
  
          def wrapped():
              return function(*setup_func())
  
          return wrapped
  
      results = timeit.repeat(
          wrapper(function, setup_func), repeat=repeat, number=number
      )
      print("\t%5.1fus" % (min(results) * 1000000.0 / number))
  
file_path: catboost/contrib/python/fonttools/fontTools/cu2qu/benchmark.py
imports: from .cu2qu import *
  import random
  import timeit
label_desc: Use image node_id 4 for calling a global function with example usage: run_benchmark(module, function, setup_suffix, repeat, number) and returns: wrapped, function