code: def test_budgets(
      runhistory, make_scenario, configspace_small, configs
  ):
      """Tests if only successful states are considered."""
      scenario = make_scenario(configspace_small)
  
      runhistory.add(
          config=configs[0],
          cost=1,
          time=1,
          status=StatusType.SUCCESS,
          budget=5,
      )
  
      runhistory.add(
          config=configs[1],
          cost=99999999,
          time=1,
          status=StatusType.SUCCESS,
          budget=2,
      )
  
      runhistory.add(
          config=configs[1],
          cost=5,
          time=4,
          status=StatusType.SUCCESS,
          budget=2,
      )
  
      # Normal encoder
      encoder = RunHistoryEncoder(
          scenario=scenario, considered_states=[StatusType.SUCCESS]
      )
      encoder.runhistory = runhistory
      X, Y = encoder.transform(budget_subset=[2])
      assert Y.tolist() == [[99999999]]
  
      X, Y = encoder.transform(budget_subset=[5])
      assert Y.tolist() == [[1]]
  
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 6 for calling a global function with example usage: test_budgets(runhistory, make_scenario, configspace_small, configs) without return types