code: def run_job(executor, task, *args, **kwargs):
      """Given an executor and a task, run the task with error reporting.
  
      `executor` should be a submitit executor.
  
      `task` can be a CommandFunction from submitit, which wraps a shell script,
      or a Python function. Further positional or keyword arguments are passed to
      the function.
      """
      job = executor.submit(task, *args, **kwargs)
      print("Submitted job")
      print("See log at:")
      print(f"\t{job.paths.stdout}")
  
      try:
          output = job.result()
          print("Job finished successfully!")
          notify(f":white_check_mark: Eval Finished for `{job}`")
          return output
      except Exception as ee:  # noqa: F841
          # submitit doesn't seem to have a parent class for their exceptions, so
          # just catch everything. We want to be aware of any failure anyway.
          # If this is noisy we can ignore certain kinds of early failures.
  
          msg = f"""
              :rotating_light: Eval failed for `{job}`
  
              See `{job.paths.stderr}`
              """.strip()
          notify(msg)
          raise
  
file_path: lm-evaluation-harness/scripts/run_eval.py
imports: import submitit
  from submitit.helpers import CommandFunction
  import argparse
  from notify import notify
  from pathlib import Path
  from main_eval import main
label_desc: Use image node_id 4 for calling a global function with example usage: run_job(executor, task) and returns: output