code: def test_fake_executor_batch(tmp_path: Path) -> None:
      executor = FakeExecutor(folder=tmp_path)
      with executor.batch():
          job = executor.submit(_three_time, 8)
          assert isinstance(job, core.DelayedJob)
      assert isinstance(job, FakeJob)
      with executor.batch():  # make sure we can send a new batch
          job = executor.submit(_three_time, 8)
          assert isinstance(job, core.DelayedJob)
      assert isinstance(job, FakeJob)
      # bad update
      with pytest.raises(RuntimeError):
          with executor.batch():
              executor.update_parameters(blublu=12)
      # bad access
      with pytest.raises(AttributeError):
          with executor.batch():
              job = executor.submit(_three_time, 8)
              assert isinstance(job, core.DelayedJob)
              job.job_id  # pylint: disable=pointless-statement
          assert isinstance(job, core.DelayedJob)
  
      with executor.batch(allow_implicit_submissions=True):
          job = executor.submit(_three_time, 8)
          assert isinstance(job, core.DelayedJob)
          job.job_id  # pylint: disable=pointless-statement
          assert isinstance(job, FakeJob)
          assert not executor._delayed_batch
  
      # empty context
      with pytest.warns(RuntimeWarning):
          with executor.batch():
              pass
      # multi context
      with pytest.raises(RuntimeError):
          with executor.batch():
              with executor.batch():
                  job = executor.submit(_three_time, 8)
                  assert isinstance(job, core.DelayedJob)
              assert isinstance(job, FakeJob)
  
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 6 for calling a global function with example usage: test_fake_executor_batch(tmp_path) without return types