code: def test_debug_triggered(tmp_path: Path) -> None:
      def get_result(job: Job) -> Tuple[bool, Any]:
          assert isinstance(job, debug.DebugJob)
          return (job._submission._done, job._submission._result)
  
      executor = debug.DebugExecutor(tmp_path)
      for trigger in ("wait", "done", "exception", "results"):
          job = executor.submit(f_42)
          assert job.state == "QUEUED"
          assert get_result(job) == (False, None)
          getattr(job, trigger)()
          assert job.state == "DONE"
          assert get_result(job) == (True, 42)
  
file_path: submitit/submitit/local/test_debug.py
imports: import functools
  import os
  from pathlib import Path
  from typing import Any, Tuple
  import pytest
  from ..core import utils
  from ..core.core import Job
  from ..core.job_environment import JobEnvironment
  from .None import debug
label_desc: Use image node_id 6 for calling a global function with example usage: test_debug_triggered(tmp_path) and returns: job,  job