code: def _build_fn_source_0(stage):
      stage_vals = [
          (_v, "params[{!r}]".format(_k))
          for _k, _v in _expected_params_0.items()
      ]
      src = """def {7}:
      model = Sequential()
      model.add(Dense(512, input_shape=input_shape))
      model.add(Activation('relu'))
      model.add(Dropout(rate={0}, seed=32))
      model.add(Dense(units={1}, kernel_initializer={2}))
      model.add(Activation({3}))
      model.add(Dropout({4}))
  
      model.add(Dense(10))
      model.add(Activation('softmax'))
  
      model.compile(
          loss={5},
          metrics=['accuracy'],
          optimizer={6}
      )
  
      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 5 for calling a global function with example usage: _build_fn_source_0(stage) and returns: src, src