code: def test_overstep(ray_start_4_cpus_2_gpus_extra):
      """Stepping when trials are finished should raise a TuneError.
  
      Legacy test: test_trial_runner_2.py::TrialRunnerTest::testThrowOnOverstep
      """
      os.environ["TUNE_MAX_PENDING_TRIALS_PG"] = "1"
      runner = TuneController(
          resource_manager_factory=lambda: BudgetResourceManager(
              {"CPU": 4}
          ),
          storage=STORAGE,
      )
      runner.step()
      with pytest.raises(TuneError):
          runner.step()
  
imports: import os
  from collections import Counter
  import pytest
  import sys
  import ray
  from ray.train import CheckpointConfig
  from ray.air.execution import FixedResourceManager, PlacementGroupResourceManager
  from ray.tune import PlacementGroupFactory, TuneError
  from ray.tune.execution.tune_controller import TuneController
  from ray.tune.experiment import Trial
  from ray.tune.registry import TRAINABLE_CLASS, _global_registry
  from ray.tune.schedulers import FIFOScheduler
  from ray.tune.search import BasicVariantGenerator
  from ray.train.tests.util import mock_storage_context
  from ray.tune.tests.execution.utils import BudgetResourceManager
label_desc: Use image node_id 4 for calling a global function with example usage: test_overstep(ray_start_4_cpus_2_gpus_extra) without return types