code: def test_with_filled_runhistory(
      make_scenario, configspace_small, make_config_selector
  ):
      """Tests whether the tracker is updated when providing a filled runhistory"""
      # Without instances
      scenario: Scenario = make_scenario(
          configspace_small,
          use_instances=True,
          min_budget=1,
          max_budget=3,
      )
      runhistory = RunHistory()
      intensifier = SuccessiveHalving(scenario=scenario)
      intensifier.config_selector = make_config_selector(
          scenario, runhistory, n_initial_configs=1
      )
  
      # Add some entries to the runhistory
      configs = configspace_small.sample_configuration(5)
      for config in configs:
          runhistory.add(
              config=config,
              cost=0.5,
              time=0.0,
              instance=scenario.instances[1],
              seed=8,
              status=StatusType.SUCCESS,
          )
      assert len(configs) == 5
  
      # Now we set the runhistory
      intensifier.runhistory = runhistory
      intensifier.__post_init__()
  
      assert 8 in intensifier._tf_seeds
  
      gen = iter(intensifier)
      next(gen)
  
      # The tracker has to be updated now, meaning that all configs should have been added to
      # the first stage
      # Since we have a max budget of 3, we expect to have these configs batched
      assert len(intensifier._tracker[(0, 0)][0][1]) == 3
  
      # We would expect 2 here but SH is always filling up empty spaces so that we naturally get 3
      assert len(intensifier._tracker[(0, 0)][1][1]) == 3
  
file_path: SMAC3/tests/test_intensifier/test_successive_halving.py
imports: import pytest
  from smac.initial_design.random_design import RandomInitialDesign
  from smac.intensifier.successive_halving import SuccessiveHalving
  from smac.main.config_selector import ConfigSelector
  from smac.runhistory.dataclasses import InstanceSeedBudgetKey
  from smac.runhistory.enumerations import StatusType
  from smac.runhistory.runhistory import RunHistory
  from smac.scenario import Scenario
label_desc: Use image node_id 11 for calling a global function with example usage: test_with_filled_runhistory(make_scenario, configspace_small, make_config_selector) without return types