code: def test_objective_weights(scenario, runhistory, config1, config2):
      runhistory.multi_objective_algorithm = MeanAggregationStrategy(
          scenario
      )
      runhistory.add(
          config=config1,
          cost=[0, 10],
          time=5,
          status=StatusType.SUCCESS,
      )
  
      runhistory.add(
          config=config2,
          cost=[100, 0],
          time=15,
          status=StatusType.SUCCESS,
      )
  
      assert runhistory._objective_bounds[0] == (0, 100)
      assert runhistory._objective_bounds[1] == (0, 10)
  
      # Average cost returns us 0.5
      assert runhistory.get_cost(config1) == 0.5
  
      # If we change the weights/mo algorithm now, we expect a higher value in the second cost
      runhistory.multi_objective_algorithm = MeanAggregationStrategy(
          scenario, objective_weights=[1, 2]
      )
      assert round(runhistory.get_cost(config1), 2) == 0.67
  
imports: import pickle
  import tempfile
  import pytest
  from smac.multi_objective.aggregation_strategy import MeanAggregationStrategy
  from smac.runner.abstract_runner import StatusType
  from smac.scenario import Scenario
label_desc: Use image node_id 18 for calling a global function with example usage: test_objective_weights(scenario, runhistory, config1, config2) without return types