code: def test_closest_lookup_dict(self) -> None:
      # test empty lookup
      d = ClosestLookupDict()
      with self.assertRaises(RuntimeError):
          d[0]
      # basic test
      keys = (1.0, 2, 4)
      vals = ("a", "b", "c")
      d = ClosestLookupDict(zip(keys, vals))
      for k, v in zip(keys, vals):
          self.assertEqual(d[k], v)
      self.assertEqual(d[2.5], "b")
      self.assertEqual(d[0], "a")
      self.assertEqual(d[6], "c")
      with self.assertRaises(ValueError):
          # pyre-fixme[6]: For 1st param expected `Number` but got `str`.
          d["str_key"] = 3
  
file_path: Ax/ax/modelbridge/tests/test_transform_utils.py
imports: from unittest import mock
  import numpy
  from ax.core.data import Data
  from ax.core.experiment import Experiment
  from ax.core.observation import Observation, ObservationData, ObservationFeatures
  from ax.core.parameter import ParameterType, RangeParameter
  from ax.core.search_space import SearchSpace
  from ax.modelbridge.base import ModelBridge
  from ax.modelbridge.transforms.utils import ClosestLookupDict, derelativize_optimization_config_with_raw_status_quo
  from ax.utils.common.testutils import TestCase
  from ax.utils.testing.core_stubs import get_multi_objective_optimization_config
label_desc: Use image node_id 1 for calling the TransformUtilsTest obj's underlying member method code with example usage: obj.test_closest_lookup_dict() without return types