code: def test_fake_job(tmp_path: Path) -> None:
      job: FakeJob[int] = FakeJob(job_id="12", folder=tmp_path)
      repr(job)
      assert not job.done(force_check=True)
      # logs
      assert job.stdout() is None
      assert job.stderr() is None
      with job.paths.stderr.open("w") as f:
          f.write("blublu")
      assert job.stderr() == "blublu"
      # result
      utils.cloudpickle_dump(("success", 12), job.paths.result_pickle)
      assert job.result() == 12
      # exception
      assert job.exception() is None
      utils.cloudpickle_dump(
          ("error", "blublu"), job.paths.result_pickle
      )
      assert isinstance(job.exception(), Exception)
      with pytest.raises(core.utils.FailedJobError):
          job.result()
  
imports: import contextlib
  import pickle
  import subprocess
  import sys
  import time
  import typing
  from pathlib import Path
  from unittest.mock import patch
  import pytest
  from .None import core, submission, utils
label_desc: Use image node_id 3 for calling a global function with example usage: test_fake_job(tmp_path) without return types