code: def test_w_parameter_distributions(self) -> None:
      rss = get_robust_search_space()
      rss.add_parameter(
          FixedParameter(
              "d", parameter_type=ParameterType.STRING, value="a"
          ),
      )
      # Transform a non-distributional parameter.
      t = RemoveFixed(
          search_space=rss,
          observations=[],
      )
      rss = t.transform_search_space(rss)
      # Make sure that the return value is still a RobustSearchSpace.
      self.assertIsInstance(rss, RobustSearchSpace)
      self.assertEqual(len(rss.parameters.keys()), 4)
      # pyre-fixme[16]: `SearchSpace` has no attribute `parameter_distributions`.
      self.assertEqual(len(rss.parameter_distributions), 2)
      self.assertNotIn("d", rss.parameters)
      # Test with environmental variables.
      all_params = list(rss.parameters.values())
      rss = RobustSearchSpace(
          parameters=all_params[2:],
          parameter_distributions=rss.parameter_distributions,
          # pyre-fixme[16]: `SearchSpace` has no attribute `num_samples`.
          num_samples=rss.num_samples,
          environmental_variables=all_params[:2],
      )
      rss.add_parameter(
          FixedParameter(
              "d", parameter_type=ParameterType.STRING, value="a"
          ),
      )
      t = RemoveFixed(
          search_space=rss,
          observations=[],
      )
      rss = t.transform_search_space(rss)
      self.assertIsInstance(rss, RobustSearchSpace)
      self.assertEqual(len(rss.parameters.keys()), 4)
      self.assertEqual(len(rss.parameter_distributions), 2)
      # pyre-fixme[16]: `SearchSpace` has no attribute `_environmental_variables`.
      self.assertEqual(len(rss._environmental_variables), 2)
      self.assertNotIn("d", rss.parameters)
  
file_path: Ax/ax/modelbridge/transforms/tests/test_remove_fixed_transform.py
imports: from copy import deepcopy
  from ax.core.observation import ObservationFeatures
  from ax.core.parameter import ChoiceParameter, FixedParameter, ParameterType, RangeParameter
  from ax.core.search_space import RobustSearchSpace, SearchSpace
  from ax.modelbridge.transforms.remove_fixed import RemoveFixed
  from ax.utils.common.testutils import TestCase
  from ax.utils.testing.core_stubs import get_robust_search_space
label_desc: Use image node_id 5 for calling the RemoveFixedTransformTest obj's underlying member method code with example usage: obj.test_w_parameter_distributions() without return types