class_docstr: A dictionary with numeric keys that looks up the closest key.
code: def __getitem__(self, key: Number) -> Any:
      try:
          return super().__getitem__(key)
      except KeyError:
          if not self.keys():
              raise RuntimeError("ClosestLookupDict is empty.")
          ipos = np.searchsorted(self._keys, key)
          if ipos == 0:
              return super().__getitem__(self._keys[0])
          elif ipos == len(self._keys):
              return super().__getitem__(self._keys[-1])
          lkey, rkey = self._keys[ipos - 1 : ipos + 1]
          if np.abs(key - lkey) <= np.abs(
              key - rkey
          ):  # pyre-ignore [58]
              return super().__getitem__(lkey)
          else:
              return super().__getitem__(rkey)
  
imports: from __future__ import annotations
  from collections import defaultdict
  from math import isnan
  from numbers import Number
  from typing import Any, Callable, Dict, List, Optional, Tuple, TYPE_CHECKING, Union
  import numpy
  from ax.core.observation import Observation, ObservationData, ObservationFeatures
  from ax.core.optimization_config import OptimizationConfig
  from ax.core.parameter import Parameter
  from ax.core.parameter_constraint import ParameterConstraint
  from ax.core.search_space import RobustSearchSpace, SearchSpace
  from ax.modelbridge.transforms.derelativize import Derelativize
  from scipy.stats import norm
label_desc: Use image node_id 3 for calling the ClosestLookupDict obj's underlying member method code with example usage: obj.__getitem__(key) and returns: super, super, super, super, super