code: def test_checkpoint_and_exit(tmp_path: Path) -> None:
      usr_sig = submitit.JobEnvironment._usr_sig()
      with mocked_slurm():
          executor = slurm.SlurmExecutor(
              folder=tmp_path, max_num_timeout=1
          )
          executor.update_parameters(time=60)
          job = executor.submit(test_core._three_time, 10)
  
      sig = get_signal_handler(job)
      with pytest.raises(SystemExit), mock_requeue(not_called=True):
          sig.checkpoint_and_exit(usr_sig)
  
      # checkpoint_and_exit doesn't modify timeout counters.
      delayed = utils.DelayedSubmission.load(job.paths.submitted_pickle)
      assert delayed._timeout_countdown == 1
  
imports: import contextlib
  import os
  import signal
  import subprocess
  import typing
  from pathlib import Path
  from unittest.mock import patch
  import pytest
  import submitit
  from ..None import helpers
  from ..core import job_environment, submission, test_core, utils
  from ..core.core import Job
  from .None import slurm
label_desc: Use image node_id 12 for calling a global function with example usage: test_checkpoint_and_exit(tmp_path) without return types