code: def test_slurm_job_mocked(tmp_path: Path) -> None:
      with mocked_slurm() as mock:
          executor = slurm.SlurmExecutor(folder=tmp_path)
          job = executor.submit(test_core.do_nothing, 1, 2, blublu=3)
          # First mock job always have id 12
          assert job.job_id == "12"
          assert job.state == "RUNNING"
          assert job.stdout() is None
          _mock_log_files(
              job, errors="This is the error log\n", prints="hop"
          )
          job._results_timeout_s = 0
          with pytest.raises(utils.UncompletedJobError):
              job._get_outcome_and_result()
          _mock_log_files(
              job, errors="This is the error log\n", prints="hop"
          )
  
          with mock.job_context(job.job_id):
              submission.process_job(job.paths.folder)
          assert job.result() == 12
          # logs
          assert job.stdout() == "hop"
          assert job.stderr() == "This is the error log\n"
          assert (
              "_USELESS_TEST_ENV_VAR_" not in os.environ
          ), "Test context manager seems to be failing"
  
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 5 for calling a global function with example usage: test_slurm_job_mocked(tmp_path) without return types