code: def test_multi_objective(
      runhistory, make_scenario, configspace_small, configs
  ):
      configs = configspace_small.sample_configuration(20)
      scenario = make_scenario(
          configspace_small, use_multi_objective=True
      )
  
      runhistory.add(
          config=configs[0],
          cost=[0.0, 100.0],
          time=5,
          status=StatusType.SUCCESS,
      )
  
      # Multi objective algorithm must be set
      with pytest.raises(AssertionError):
          encoder = RunHistoryEncoder(
              scenario=scenario, considered_states=[StatusType.SUCCESS]
          )
          encoder.runhistory = runhistory
          _, Y = encoder.transform()
  
      encoder.multi_objective_algorithm = MeanAggregationStrategy(
          scenario
      )
      encoder.runhistory = runhistory
      _, Y = encoder.transform()
  
      # We expect the result to be 1 because no normalization could be done yet
      assert Y.flatten() == 1.0
  
      runhistory.add(
          config=configs[2],
          cost=[50.0, 50.0],
          time=4,
          status=StatusType.SUCCESS,
      )
  
      # Now we expect something different
      _, Y = encoder.transform()
      assert Y.tolist() == [[0.5], [0.5]]
  
      runhistory.add(
          config=configs[3],
          cost=[200.0, 0.0],
          time=4,
          status=StatusType.SUCCESS,
      )
  
      _, Y = encoder.transform()
      assert Y.tolist() == [
          [0.5],  # (0+1)/2
          [0.375],  # (0.25+0.5) / 2
          [0.5],  # (1+0) / 2
      ]
  
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 4 for calling a global function with example usage: test_multi_objective(runhistory, make_scenario, configspace_small, configs) without return types