code: def normalize_dimensions(dimensions):
      """Create a `Space` where all dimensions are instructed to be normalized to unit range. Note
      that this doesn't *really* return normalized `dimensions`. It just returns the given
      `dimensions`, with each one's `transform` set to the appropriate value, so that when each
      dimension's :meth:`transform` is called, the dimensions are actually normalized
  
      Parameters
      ----------
      dimensions: List
          List of search space dimensions. Each search dimension can be defined as any of the
          following: 1) a `(lower_bound, upper_bound)` tuple (for `Real` or `Integer` dimensions).
          2) A `(lower_bound, upper_bound, "prior")` tuple (for `Real` dimensions).
          3) A list of categories (for `Categorical` dimensions).
          4) An instance of a `Dimension` object (`Real`, `Integer`, or `Categorical`)
  
      Returns
      -------
      :class:`hyperparameter_hunter.space.Space`
          Hyperparameter space class instance, in which dimensions have been instructed to be
          normalized to unit range upon invocation of the `transform` method
  
      Raises
      ------
      RuntimeError
          If a processed element of `dimensions` is not one of: `Real`, `Integer`, `Categorical`
  
      Notes
      -----
      The upper and lower bounds are inclusive for `Integer` dimensions
      """
      space = Space(dimensions)
      transformed_dimensions = []
  
      if space.is_categorical:
          for dim in space:
              # `skopt.utils.normalize_dimensions` makes comment on explicitly setting
              #   `transform="identity"`, so apparently there's a good reason for it...
              # Using original `transform` fixes all-`Categorical`/`BayesianOptPro` bug and proper
              #   saved experiment result matching, but optimizer could be secretly misbehaving...
              transformed_dimensions.append(
                  Categorical(
                      dim.categories,
                      dim.prior,
                      transform=dim.transform_,
                      name=dim.name,
                  )
                  # Categorical(dim.categories, dim.prior, transform="identity", name=dim.name)
              )
      else:
          for dim in space.dimensions:
              if isinstance(dim, Categorical):
                  transformed_dimensions.append(dim)
              elif isinstance(dim, Real):
                  transformed_dimensions.append(
                      Real(
                          dim.low,
                          dim.high,
                          dim.prior,
                          transform="normalize",
                          name=dim.name,
                      )
                  )
              elif isinstance(dim, Integer):
                  transformed_dimensions.append(
                      Integer(
                          dim.low,
                          dim.high,
                          transform="normalize",
                          name=dim.name,
                      )
                  )
              else:
                  raise RuntimeError(
                      f"Unknown dimension type: {type(dim)}"
                  )
              #################### Replace Lost Attributes ####################
              if hasattr(dim, "location"):
                  transformed_dimensions[-1].location = dim.location
  
      return Space(transformed_dimensions)
  
imports: from hyperparameter_hunter.space.dimensions import Dimension, Real, Integer, Categorical
  from hyperparameter_hunter.utils.general_utils import short_repr
  from functools import reduce
  import numbers
  import numpy
  from sys import maxsize
  from sklearn.utils import check_random_state
  from sklearn.utils.fixes import sp_version
label_desc: Use image node_id 2 for calling a global function with example usage: normalize_dimensions(dimensions) and returns: Space