code: def test_initialization_fails(make_scenario, configspace_small):
      """Tests whether SH is initialized correctly."""
      # Error: Max budget must be higher than min budget
      scenario: Scenario = make_scenario(
          configspace_small,
          use_instances=True,
          min_budget=10,
          max_budget=6,
      )
      intensifier = SuccessiveHalving(scenario=scenario)
      runhistory = RunHistory()
  
      with pytest.raises(ValueError):
          intensifier.runhistory = runhistory
          intensifier.__post_init__()
  
      # Error: Must be integers
      scenario: Scenario = make_scenario(
          configspace_small,
          use_instances=True,
          min_budget=3.0,
          max_budget=6.0,
      )
      intensifier = SuccessiveHalving(scenario=scenario)
      runhistory = RunHistory()
  
      with pytest.raises(ValueError):
          intensifier.runhistory = runhistory
          intensifier.__post_init__()
  
      # Error: Need budgets defined
      scenario: Scenario = make_scenario(
          configspace_small,
          use_instances=False,
          min_budget=None,
          max_budget=None,
      )
      intensifier = SuccessiveHalving(scenario=scenario)
      runhistory = RunHistory()
  
      with pytest.raises(ValueError):
          intensifier.runhistory = runhistory
          intensifier.__post_init__()
  
      # Error: Min budget must be higher than 0
      scenario: Scenario = make_scenario(
          configspace_small,
          use_instances=False,
          min_budget=-1,
          max_budget=50,
      )
      intensifier = SuccessiveHalving(scenario=scenario)
      runhistory = RunHistory()
  
      with pytest.raises(ValueError):
          intensifier.runhistory = runhistory
          intensifier.__post_init__()
  
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 1 for calling a global function with example usage: test_initialization_fails(make_scenario, configspace_small) without return types