code: def data():
      """
      Data providing function:
  
      This function is separated from model() so that hyperopt
      won't reload data for each evaluation run.
      """
      (X_train, y_train), (X_test, y_test) = mnist.load_data()
      X_train = X_train.reshape(60000, 784)
      X_test = X_test.reshape(10000, 784)
      X_train = X_train.astype("float32")
      X_test = X_test.astype("float32")
  
      visualization_mnist(X_test)
  
      X_train /= 255
      X_test /= 255
      nb_classes = 10
      Y_train = np_utils.to_categorical(y_train, nb_classes)
      Y_test = np_utils.to_categorical(y_test, nb_classes)
      return X_train, Y_train, X_test, Y_test
  
file_path: hyperas/examples/use_intermediate_functions.py
imports: from __future__ import print_function
  from hyperopt import Trials, STATUS_OK, tpe
  from hyperas import optim
  from hyperas.distributions import choice, uniform
  from keras.models import Sequential
  from keras.layers.core import Dense, Dropout, Activation
  from keras.optimizers import RMSprop
  from keras.datasets import mnist
  from keras.utils import np_utils
  import matplotlib.pyplot
label_desc: Use image node_id 2 for calling a global function with example usage: data() and returns: X_train,  Y_train,  X_test,  Y_test