code: def test_getting(runhistory, config1, config2):
      """Test that rh[k] will return the correct value"""
      k = add_item(runhistory, config1, cost=1.0)
      k2 = add_item(runhistory, config2, cost=2.0)
  
      v = runhistory[k]
      assert v.cost == 1.0
  
      v2 = runhistory[k2]
      assert v2.cost == 2.0
  
imports: from __future__ import annotations
  import os
  import pickle
  import tempfile
  import pytest
  from smac.runhistory.runhistory import RunHistory, TrialKey
  from smac.runner.abstract_runner import StatusType
label_desc: Use image node_id 17 for calling a global function with example usage: test_getting(runhistory, config1, config2) without return types