code: def normalize_dimensions(dimensions):
      """Create a ``Space`` where all dimensions are normalized to unit range.
  
      This is particularly useful for Gaussian process based regressors and is
      used internally by ``gp_minimize``.
  
      Parameters
      ----------
      dimensions : list, shape (n_dims,)
          List of search space dimensions.
          Each search dimension can be defined either as
  
          - a `(lower_bound, upper_bound)` tuple (for `Real` or `Integer`
            dimensions),
          - a `(lower_bound, upper_bound, "prior")` tuple (for `Real`
            dimensions),
          - as a list of categories (for `Categorical` dimensions), or
          - an instance of a `Dimension` object (`Real`, `Integer` or
            `Categorical`).
  
           NOTE: The upper and lower bounds are inclusive for `Integer`
           dimensions.
      """
      space = Space(dimensions)
      transformed_dimensions = []
      for dimension in space.dimensions:
          # check if dimension is of a Dimension instance
          if isinstance(dimension, Dimension):
              # Change the transformer to normalize
              # and add it to the new transformed dimensions
              dimension.set_transformer("normalize")
              transformed_dimensions.append(dimension)
          else:
              raise RuntimeError(
                  "Unknown dimension type " "(%s)" % type(dimension)
              )
  
      return Space(transformed_dimensions)
  
imports: from copy import deepcopy
  from functools import wraps
  from sklearn.utils import check_random_state
  import numpy
  from scipy.optimize import OptimizeResult
  from scipy.optimize import minimize
  from sklearn.base import is_regressor
  from sklearn.ensemble import GradientBoostingRegressor
  from joblib import dump
  from joblib import load
  from collections import OrderedDict
  from .learning import ExtraTreesRegressor
  from .learning import GaussianProcessRegressor
  from .learning import GradientBoostingQuantileRegressor
  from .learning import RandomForestRegressor
  from .learning.gaussian_process.kernels import ConstantKernel
  from .learning.gaussian_process.kernels import HammingKernel
  from .learning.gaussian_process.kernels import Matern
  from .sampler import Sobol, Lhs, Hammersly, Halton, Grid
  from .sampler import InitialPointGenerator
  from .space import Space, Categorical, Integer, Real, Dimension
label_desc: Use image node_id 16 for calling a global function with example usage: normalize_dimensions(dimensions) and returns: Space