code: def test_runner_stop_bad_performers():
      r = sherpa.core._Runner(
          study=mock.MagicMock(),
          scheduler=mock.MagicMock(),
          database=mock.MagicMock(),
          max_concurrent=1,
          command=["python", "test.py"],
      )
  
      # setup
      t = get_test_trial()
      r._active_trials.append(t.id)
      r._all_trials[t.id] = {"trial": t, "job_id": "111"}
  
      # test that trial is stopped
      r.update_active_trials = mock.MagicMock()
      r.study.should_trial_stop.return_value = True
      r.stop_bad_performers()
      r.scheduler.kill_job.assert_called_with("111")
  
      # test that trial is not stopped
      r.study.should_trial_stop.return_value = False
      r.stop_bad_performers()
  
file_path: sherpa/tests/test_runner.py
imports: import sherpa
  import sherpa.core
  import sherpa.schedulers
  import sherpa.database
  from testing_utils import *
label_desc: Use image node_id 3 for calling a global function with example usage: test_runner_stop_bad_performers() without return types