code: def check_dummy_params(params):
      """Locate and dummify hyperparameter space choices in `params`, if the hyperparameter is used
      for model compilation
  
      Parameters
      ----------
      params: Dict
          A dictionary of hyperparameters, in which values may be hyperparameter space choices
  
      Returns
      -------
      checked_params: Dict
          A replica of `params`, in which instances of hyperparameter space choices are replaced with
          dummy values
      dummified_params: Dict
          A record of keys that were found whose values were hyperparameter space choices, mapped to
          tuple pairs of (<original value>, <path to key>)"""
      compile_keys = [
          "optimizer",
          "loss",
          "metrics",
          "loss_weights",
          "sample_weight_mode",
          "weighted_metrics",
          "target_tensors",
      ]
  
      dummified_params = dict()
  
      # noinspection PyUnusedLocal
      def _visit(path, key, value):
          """If `value` is a descendant of :class:`space.Dimension`, return its lower bound and
          collect it. Else, default return"""
          if key in compile_keys:
              if isinstance(value, (Real, Integer, Categorical)):
                  dummified_params[path + (key,)] = value
                  return (key, value.bounds[0])
          return (key, value)
  
      checked_params = remap(params, visit=_visit)
      return checked_params, dummified_params
  
imports: from hyperparameter_hunter.settings import G, TEMP_MODULES_DOT_PATH, TEMP_MODULES_DIR_PATH
  from hyperparameter_hunter.compat.keras_helper import parameterize_compiled_keras_model
  from hyperparameter_hunter.space.dimensions import Real, Integer, Categorical
  from hyperparameter_hunter.utils.boltons_utils import remap, default_enter
  from hyperparameter_hunter.utils.general_utils import deep_restricted_update, subdict
  from hyperparameter_hunter.utils.parsing_utils import stringify_model_builder, write_python, build_temp_model_file
  from collections import OrderedDict
  from copy import deepcopy
  from datetime import datetime
  from importlib.util import spec_from_file_location, module_from_spec
  import os
  import re
  import sys
  from types import FunctionType, MethodType
label_desc: Use image node_id 4 for calling a global function with example usage: check_dummy_params(params) and returns: checked_params,  dummified_params, key,  value, key,  value