code: def test_debug_error(tmp_path: Path) -> None:
      def failing_job() -> None:
          raise RuntimeError("Failed on purpose")
  
      executor = debug.DebugExecutor(tmp_path)
      job = executor.submit(failing_job)
      exception = job.exception()
      assert isinstance(exception, RuntimeError)
      message = exception.args[0]
      assert "Failed on purpose" in message
  
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 4 for calling a global function with example usage: test_debug_error(tmp_path) without return types