code: def test_lower_budget_states(
      runhistory, make_scenario, configspace_small, configs
  ):
      """Tests lower budgets based on budget subset and considered states."""
      scenario = make_scenario(configspace_small)
      encoder = RunHistoryEncoder(
          scenario=scenario, considered_states=[StatusType.SUCCESS]
      )
      encoder.runhistory = runhistory
  
      runhistory.add(
          config=configs[0],
          cost=1,
          time=1,
          status=StatusType.SUCCESS,
          budget=3,
      )
      runhistory.add(
          config=configs[0],
          cost=2,
          time=2,
          status=StatusType.SUCCESS,
          budget=4,
      )
      runhistory.add(
          config=configs[0],
          cost=3,
          time=4,
          status=StatusType.TIMEOUT,
          budget=5,
      )
  
      # We request a higher budget but can't find it, so we expect an empty list
      X, Y = encoder.transform(budget_subset=[500])
      assert Y.tolist() == []
  
      encoder = RunHistoryEncoder(
          scenario=scenario,
          considered_states=[StatusType.SUCCESS],
          lower_budget_states=[StatusType.TIMEOUT],
      )
      encoder.runhistory = runhistory
  
      # We request a higher budget but can't find it but since we consider TIMEOUT for lower budget states, we should
      # receive the cost of 3
      X, Y = encoder.transform(budget_subset=[500])
      assert Y.tolist() == [[3.0]]
  
file_path: SMAC3/tests/test_runhistory/test_runhistory_encoder.py
imports: import numpy
  import pytest
  from smac.multi_objective.aggregation_strategy import MeanAggregationStrategy
  from smac.runhistory.encoder import RunHistoryEIPSEncoder, RunHistoryInverseScaledEncoder, RunHistoryLogEncoder, RunHistoryLogScaledEncoder, RunHistoryScaledEncoder, RunHistorySqrtScaledEncoder
  from smac.runhistory.encoder.encoder import RunHistoryEncoder
  from smac.runner.abstract_runner import StatusType
label_desc: Use image node_id 8 for calling a global function with example usage: test_lower_budget_states(runhistory, make_scenario, configspace_small, configs) without return types