code: def test_add_and_pickle(scenario, runhistory, config1):
      """
      Simply adding some rundata to runhistory, then pickle it.
      """
      assert runhistory.empty()
      runhistory.multi_objective_algorithm = MeanAggregationStrategy(
          scenario
      )
  
      runhistory.add(
          config=config1,
          cost=[10, 20],
          time=20,
          status=StatusType.SUCCESS,
          instance=None,
          seed=None,
          starttime=100,
          endtime=120,
          additional_info=None,
      )
  
      runhistory.add(
          config=config1,
          cost=[4.5, 5.5],
          time=20,
          status=StatusType.SUCCESS,
          instance=1,
          seed=12354,
          starttime=10,
          endtime=30,
          additional_info={"start_time": 10},
      )
  
      runhistory.add(
          config=config1,
          cost=["4.8", "5.8"],
          time=20,
          status=StatusType.SUCCESS,
          instance=1,
          seed=12354,
          starttime=10,
          endtime=30,
          additional_info={"start_time": 10},
      )
  
      assert not runhistory.empty()
  
      tmpfile = tempfile.NamedTemporaryFile(mode="wb", delete=False)
      pickle.dump(runhistory, tmpfile, -1)
      name = tmpfile.name
      tmpfile.close()
  
      with open(name, "rb") as fh:
          loaded_runhistory = pickle.load(fh)  # nosec
  
      assert loaded_runhistory._data == runhistory._data
  
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 5 for calling a global function with example usage: test_add_and_pickle(scenario, runhistory, config1) without return types