code: def _build_fn_source_1(stage):
      stage_vals = [
          (_v, "params[{!r}]".format(_k))
          for _k, _v in _expected_params_1.items()
      ]
      src = '''def {8}:
      """Keras model-building function that contains hyperparameter space declarations
      Parameters
      ----------
      input_shape: Int
          The shape of the input provided to the first layer of the model
  
      Returns
      -------
      model: Instance of :class:`keras.Sequential`
          A compiled Keras model"""
      model = Sequential()
      model.add(Dense(512, input_shape=(784,)))
      model.add(Activation('relu'))
      model.add(Dropout({0}))
      model.add(Dense({1}))
      model.add(Activation({2}))
      model.add(Dropout({3}))
  
      if {4} == 'four':
          model.add(Dense(100))
          model.add({5})
          model.add(Activation('relu'))
  
      model.add(Dense(10))
      model.add(Activation('softmax'))
  
      model.compile(
          loss={6}, 
          metrics=['accuracy'], 
          optimizer={7}
      )
  
      return model'''
  
      if stage == "original":
          return src.format(
              *[_[0] for _ in stage_vals], "create_model(input_shape)"
          )
      elif stage == "reusable":
          return src.format(
              *[_[1] for _ in stage_vals],
              "build_fn(input_shape=(10, ), params=None)",
          )
  
file_path: hyperparameter_hunter/tests/test_keras_optimization_helper.py
imports: from hyperparameter_hunter.compat.keras_optimization_helper import clean_parenthesized_string, consolidate_layers, find_space_fragments, merge_compile_params, rewrite_model_builder
  from hyperparameter_hunter import Real, Categorical
  from collections import OrderedDict
  import pytest
label_desc: Use image node_id 6 for calling a global function with example usage: _build_fn_source_1(stage) and returns: src, src