code: def create_model(x_train, y_train, x_test, y_test):
      """
      Create your model...
      """
      layer_1_size = {{quniform(12, 256, 4)}}
      l1_dropout = {{uniform(0.001, 0.7)}}
      params = {"l1_size": layer_1_size, "l1_dropout": l1_dropout}
      num_classes = 10
      model = Sequential()
      model.add(Dense(int(layer_1_size), activation="relu"))
      model.add(Dropout(l1_dropout))
      model.add(Dense(num_classes, activation="softmax"))
      model.compile(
          loss="categorical_crossentropy",
          optimizer=RMSprop(),
          metrics=["accuracy"],
      )
      model.fit(
          x_train,
          y_train,
          batch_size=128,
          epochs=10,
          validation_data=(x_test, y_test),
      )
      score, acc = model.evaluate(x_test, y_test, verbose=0)
      out = {
          "loss": -acc,
          "score": score,
          "status": STATUS_OK,
          "model_params": params,
      }
      # optionally store a dump of your model here so you can get it from the database later
      temp_name = (
          tempfile.gettempdir()
          + "/"
          + next(tempfile._get_candidate_names())
          + ".h5"
      )
      model.save(temp_name)
      with open(temp_name, "rb") as infile:
          model_bytes = infile.read()
      out["model_serial"] = model_bytes
      return out
  
file_path: hyperas/examples/mnist_distributed.py
imports: from hyperas import optim
  from hyperas.distributions import quniform, uniform
  from hyperopt import STATUS_OK, tpe, mongoexp
  import keras
  from keras.layers import Dense, Dropout
  from keras.models import Sequential
  from keras.optimizers import RMSprop
  from keras.datasets import mnist
  import tempfile
label_desc: Use image node_id 2 for calling a global function with example usage: create_model(x_train, y_train, x_test, y_test) and returns: out