code: def test_w_parameter_distributions(self) -> None:
      rss = get_robust_search_space()
      # Transform a non-distributional parameter.
      t = IntToFloat(
          search_space=rss,
          observations=[],
      )
      rss_new = t.transform_search_space(rss)
      # Make sure that the return value is still a RobustSearchSpace.
      self.assertIsInstance(rss_new, RobustSearchSpace)
      self.assertEqual(
          set(rss.parameters.keys()), set(rss_new.parameters.keys())
      )
      # pyre-fixme[16]: `SearchSpace` has no attribute `parameter_distributions`.
      self.assertEqual(
          rss.parameter_distributions, rss_new.parameter_distributions
      )
      self.assertEqual(
          # pyre-fixme[16]: Optional type has no attribute `parameter_type`.
          rss_new.parameters.get("z").parameter_type,
          ParameterType.FLOAT,
      )
      # Test with environmental variables.
      all_params = list(rss.parameters.values())
      rss = RobustSearchSpace(
          parameters=all_params[2:],
          parameter_distributions=rss.parameter_distributions,
          num_samples=rss.num_samples,
          environmental_variables=all_params[:2],
      )
      t = IntToFloat(
          search_space=rss,
          observations=[],
      )
      rss_new = t.transform_search_space(rss)
      self.assertIsInstance(rss_new, RobustSearchSpace)
      self.assertEqual(
          set(rss.parameters.keys()), set(rss_new.parameters.keys())
      )
      self.assertEqual(
          rss.parameter_distributions, rss_new.parameter_distributions
      )
      # pyre-fixme[16]: `SearchSpace` has no attribute `_environmental_variables`.
      self.assertEqual(
          rss._environmental_variables, rss_new._environmental_variables
      )
      self.assertEqual(
          rss_new.parameters.get("z").parameter_type,
          ParameterType.FLOAT,
      )
      # Error with distributional parameter.
      rss = get_robust_search_space(use_discrete=True)
      t = IntToFloat(
          search_space=rss,
          observations=[],
      )
      with self.assertRaisesRegex(
          UnsupportedError, "transform is not supported"
      ):
          t.transform_search_space(rss)
  
imports: from copy import deepcopy
  from unittest import mock
  from ax.core.observation import ObservationFeatures
  from ax.core.parameter import ChoiceParameter, ParameterType, RangeParameter
  from ax.core.parameter_constraint import OrderConstraint, SumConstraint
  from ax.core.search_space import RobustSearchSpace, SearchSpace
  from ax.exceptions.core import UnsupportedError
  from ax.modelbridge.transforms.int_to_float import IntToFloat
  from ax.utils.common.testutils import TestCase
  from ax.utils.common.typeutils import checked_cast
  from ax.utils.testing.core_stubs import get_robust_search_space
label_desc: Use image node_id 8 for calling the IntToFloatTransformTest obj's underlying member method code with example usage: obj.test_w_parameter_distributions() without return types