code: def test_debug_job(tmp_path: Path) -> None:
      def func(p: int) -> int:
          return 2 * p
  
      executor = debug.DebugExecutor(tmp_path)
      job = executor.submit(func, 4)
      assert job.result() == 8
      with executor.batch():
          job2 = executor.submit(func, 5)
      assert job2.result() == 10
      # Check that job results are cached.
      job2.submission().function = None  # type: ignore
      assert job2.result() == 10
  
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 1 for calling a global function with example usage: test_debug_job(tmp_path) and returns: unknown