code: def _run(benchmark: Benchmark, config: RunConfig, context):
      _ensure_initialized()
      if config.noisy:
          logging.info(f"{context}Running {benchmark.name}...")
      times = []
  
      timed_out = False
      try:
          burn_in_time, burn_in_timed_out = run_with_timeout(
              benchmark, config
          )
          if burn_in_timed_out:
              if config.noisy:
                  logging.warning(
                      f"burn in timed out after {burn_in_time:.2f}s"
                  )
              timed_out = True
              times.append(float(burn_in_time))
          elif config.noisy:
              logging.info(f"burn in: {burn_in_time:.2f}s")
      except Exception as e:  # pylint: disable=broad-except
          if config.noisy:
              logging.error("burn in: Caught exception")
              logging.exception(e)
          config.handler({"name": benchmark.name, "failed": True})
          return
  
      for i in range(config.n_iter):
          if timed_out:
              continue
          try:
              t, run_timed_out = run_with_timeout(benchmark, config)
              times.append(t)
              if run_timed_out:
                  if config.noisy:
                      logging.warning(
                          f"run {i + 1} timed out after {t:.2f}s"
                      )
                      timed_out = True
              elif config.noisy:
                  logging.info(f"run {i + 1}: {t:.2f}s")
          except Exception as e:  # pylint: disable=broad-except
              if config.noisy:
                  logging.error(f"run ${i + 1}: Caught exception: {e}")
              config.handler({"name": benchmark.name, "failed": True})
              return
  
      from hail.utils.java import Env
  
      peak_task_memory = get_peak_task_memory(Env.hc()._log)
      config.handler(
          {
              "name": benchmark.name,
              "failed": False,
              "timed_out": timed_out,
              "times": times,
              "peak_task_memory": [peak_task_memory],
          }
      )
  
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 11 for calling a global function with example usage: _run(benchmark, config, context) without return types