code: def test_check_started(dummy: bool) -> None:
      with parallel.Execution(2) as pex:
  
          @pex.run
          def do_test() -> None:
              if not dummy:
                  state, context = make_test_preempt_context(
                      pex.distributed, core.PreemptMode.WorkersAskChief
                  )
              else:
                  context = core.DummyPreemptContext(
                      pex.distributed, core.PreemptMode.WorkersAskChief
                  )
  
              with pytest.raises(
                  RuntimeError,
                  match="cannot call.*should_preempt.*before.*start",
              ):
                  context.should_preempt()
              with context:
                  assert context.should_preempt() is False
  
file_path: determined/harness/tests/core/test_preempt.py
imports: import threading
  import time
  from typing import Any, Dict, Tuple
  from unittest import mock
  import pytest
  from determined import core
  from tests import parallel
label_desc: Use image node_id 6 for calling a global function with example usage: test_check_started(dummy) without return types