class_docstr: Cap parameter range(s) to given values. Expects a configuration of form
  { parameter_name -> new_upper_range_value }.
  
  This transform only transforms the search space.
class_docstr_tok: ["Cap","parameter","range","(","s",")","to","given","values",".","Expects","a","configuration","of","form","{","parameter_name","-",">","new_upper_range_value","}",".","This","transform","only","transforms","the","search","space","."]
code: def _transform_search_space(
      self, search_space: SearchSpace
  ) -> SearchSpace:
      for p_name, p in search_space.parameters.items():
          if p_name in self.transform_parameters:
              if not isinstance(p, RangeParameter):
                  raise NotImplementedError(
                      "Can only cap range parameters currently."
                  )
              checked_cast(RangeParameter, p).update_range(
                  upper=self.config.get(p_name)
              )
      return search_space
  
file_path: Ax/ax/modelbridge/transforms/cap_parameter.py
imports: from typing import List, Optional, TYPE_CHECKING
  from ax.core.observation import Observation
  from ax.core.parameter import RangeParameter
  from ax.core.search_space import SearchSpace
  from ax.modelbridge.transforms.base import Transform
  from ax.models.types import TConfig
  from ax.utils.common.typeutils import checked_cast
label_desc: Use image node_id 2 for calling the CapParameter obj's underlying member method code with example usage: obj._transform_search_space(search_space) and returns: search_space