code: def test_cancel(tmp_path: Path) -> None:
      executor = debug.DebugExecutor(tmp_path)
      job = executor.submit(f_42)
      assert job.state == "QUEUED"
      job.cancel()
      assert job.state == "CANCELLED"
      with pytest.raises(
          utils.UncompletedJobError, match="was cancelled"
      ):
          job.result()
  
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 7 for calling a global function with example usage: test_cancel(tmp_path) without return types