code: def test_TransformSearchSpace(self) -> None:
      ss2 = deepcopy(self.search_space)
      ss2 = self.t.transform_search_space(ss2)
  
      self.assertIsInstance(ss2.parameters["x"], RangeParameter)
      self.assertIsInstance(ss2.parameters["b"], ChoiceParameter)
      self.assertIsInstance(ss2.parameters["c"], ChoiceParameter)
      self.assertEqual(
          ss2.parameters["x"].parameter_type, ParameterType.FLOAT
      )
      self.assertEqual(
          ss2.parameters["b"].parameter_type, ParameterType.FLOAT
      )
      self.assertEqual(
          ss2.parameters["c"].parameter_type, ParameterType.INT
      )
  
      # pyre-fixme[16]: `Parameter` has no attribute `values`.
      self.assertEqual(ss2.parameters["c"].values, [0, 1])
      self.assertEqual(ss2.parameters["c"].target_value, 0)
  
      # Test error if there are fidelities
      ss3 = SearchSpace(
          parameters=[
              ChoiceParameter(
                  "c",
                  parameter_type=ParameterType.STRING,
                  values=["online", "offline"],
                  is_task=True,
                  is_fidelity=True,
                  target_value="online",
              )
          ]
      )
      with self.assertRaises(ValueError):
          TaskEncode(
              search_space=ss3,
              observations=[],
          )
  
file_path: Ax/ax/modelbridge/transforms/tests/test_task_encode_transform.py
imports: from copy import deepcopy
  from ax.core.observation import ObservationFeatures
  from ax.core.parameter import ChoiceParameter, ParameterType, RangeParameter
  from ax.core.search_space import RobustSearchSpace, SearchSpace
  from ax.modelbridge.transforms.task_encode import TaskEncode
  from ax.utils.common.testutils import TestCase
  from ax.utils.testing.core_stubs import get_robust_search_space
label_desc: Use image node_id 4 for calling the TaskEncodeTransformTest obj's underlying member method code with example usage: obj.test_TransformSearchSpace() without return types