code: def _get_max_transformed_dimensionality(
      search_space: SearchSpace, generation_strategy: GenerationStrategy
  ) -> int:
      """
      Get dimensionality of transformed SearchSpace for all steps in the
      GenerationStrategy and return the maximum.
      """
  
      transforms_by_step = [
          _extract_transforms_and_configs(step=step)
          for step in generation_strategy._steps
      ]
  
      transformed_search_spaces = [
          transform_search_space(
              search_space=search_space,
              transforms=[Cast] + transforms,
              transform_configs=transform_configs,
          )
          for transforms, transform_configs in transforms_by_step
      ]
  
      # The length of the bounds of a SearchSpaceDigest is equal to the number of
      # dimensions present.
      dimensionalities = [
          len(
              extract_search_space_digest(
                  search_space=tf_search_space,
                  param_names=list(tf_search_space.parameters.keys()),
              ).bounds
          )
          for tf_search_space in transformed_search_spaces
      ]
  
      return max(dimensionalities)
  
file_path: Ax/ax/telemetry/common.py
imports: from datetime import datetime
  from typing import Any, Dict, List, Tuple, Type
  from ax.core.experiment import Experiment
  from ax.modelbridge.generation_strategy import GenerationStep, GenerationStrategy
  from ax.modelbridge.modelbridge_utils import extract_search_space_digest, transform_search_space
  from ax.modelbridge.registry import ModelRegistryBase, Models, SearchSpace
  from ax.modelbridge.transforms.base import Transform
  from ax.modelbridge.transforms.cast import Cast
label_desc: Use image node_id 1 for calling a global function with example usage: _get_max_transformed_dimensionality(search_space, generation_strategy) and returns: max