code: def benchmark(args=()):
      if len(args) == 2 and callable(args[1]):
          args = (args,)
  
      groups = set(h[0] for h in args)
      fs = tuple(h[1] for h in args)
  
      def inner(f):
          _registry[f.__name__] = Benchmark(f, f.__name__, groups, fs)
  
      return inner
  
imports: import timeit
  import contextlib
  import hail
  import logging
  import os
  import re
  import shutil
  import signal
  from py4j.protocol import Py4JError
  from .resources import all_resources
label_desc: Use image node_id 3 for calling a global function with example usage: benchmark(args) and returns: inner