code: def dimension_subset(hyperparameters, dimensions):
      """Return only the values of `hyperparameters` specified by `dimensions`, in the same order as
      `dimensions`
  
      Parameters
      ----------
      hyperparameters: Dict
          Dict of hyperparameters containing at least the following keys: ['model_init_params',
          'model_extra_params', 'feature_engineer', 'feature_selector']
      dimensions: List of: (strings, or tuples)
          Locations and order of the values to return from `hyperparameters`. If a value is a string,
          it is assumed to belong to `model_init_params`, and its path will be adjusted accordingly
  
      Returns
      -------
      List of hyperparameter values"""
      dimensions = [
          ("model_init_params", _) if isinstance(_, str) else _
          for _ in dimensions
      ]
      values = [
          get_path(hyperparameters, _, default=RejectedOptional())
          for _ in dimensions
      ]
      return values
  
file_path: hyperparameter_hunter/hyperparameter_hunter/utils/optimization_utils.py
imports: from hyperparameter_hunter.i_o.exceptions import ContinueRemap
  from hyperparameter_hunter.keys.hashing import make_hash_sha256
  from hyperparameter_hunter.space.dimensions import Real, Integer, Categorical, RejectedOptional
  from hyperparameter_hunter.utils.boltons_utils import get_path, remap
  from hyperparameter_hunter.utils.file_utils import read_json
  from hyperparameter_hunter.utils.general_utils import extra_enter_attrs
  from contextlib import suppress
  import pandas
label_desc: Use image node_id 7 for calling a global function with example usage: dimension_subset(hyperparameters, dimensions) and returns: values