code: def get_choice_dimensions(params, iter_attrs=None):
      """List all elements in the nested structure `params` that are hyperparameter space choices
  
      Parameters
      ----------
      params: Dict
          Parameters that may be nested and that may contain hyperparameter space choices to collect
      iter_attrs: Callable, list of callables, or None, default=None
          If callable, must evaluate to True or False when given three inputs: (path, key, value).
          Callable should return True if the current value should be entered by `remap`. If callable
          returns False, `default_enter` will be called. If `iter_attrs` is a list of callables, the
          value will be entered if any evaluates to True. If None, `default_enter` will be called
  
      Returns
      -------
      choices: List
          A list of tuple pairs, in which `choices[<index>][0]` is a tuple path specifying the
          location of the hyperparameter given a choice, and `choices[<index>][1]` is the space
          choice instance for that hyperparameter"""
      choices = []
  
      def _visit(path, key, value):
          """If `value` is a descendant of :class:`space.Dimension`, collect inputs, and return True.
          Else, return False"""
          if isinstance(value, (Real, Integer, Categorical)):
              choices.append(((path + (key,)), value))
              return True
          return False
  
      _ = remap(
          params, visit=_visit, enter=extra_enter_attrs(iter_attrs)
      )
      return choices
  
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 6 for calling a global function with example usage: get_choice_dimensions(params, iter_attrs) and returns: choices, False, True