code: def build_model(hp):
      model = keras.Sequential()
      model.add(keras.layers.Flatten(input_shape=(2, 2)))
      for i in range(3):
          model.add(
              keras.layers.Dense(
                  units=hp.Int(f"units_{str(i)}", 2, 4, 2),
                  activation="relu",
              )
          )
  
      model.add(keras.layers.Dense(2, activation="softmax"))
      model.compile(
          optimizer=keras.optimizers.Adam(
              hp.Choice("learning_rate", [1e-2, 1e-3, 1e-4])
          ),
          loss="sparse_categorical_crossentropy",
          metrics=["accuracy"],
      )
      return model
  
imports: import math
  import numpy
  import pytest
  import keras_tuner
  from keras_tuner.backend import keras
  from keras_tuner.engine import hyperparameters
  from keras_tuner.engine import trial
  from keras_tuner.tuners import bayesian
label_desc: Use image node_id 1 for calling a global function with example usage: build_model(hp) and returns: model