code: def build_keras_model():
      """
      Define a convnet model in Keras 1.2.2
      """
      from keras.models import Sequential
      from keras.layers import Dense, Dropout, Activation, Flatten
      from keras.layers import Convolution2D, MaxPooling2D
  
      keras_model = Sequential()
      keras_model.add(
          Convolution2D(
              32, 3, 3, border_mode="valid", input_shape=input_shape
          )
      )
      keras_model.add(Activation("relu"))
      keras_model.add(Convolution2D(32, 3, 3))
      keras_model.add(Activation("relu"))
      keras_model.add(MaxPooling2D(pool_size=(2, 2)))
      keras_model.add(Dropout(0.25))
      keras_model.add(Flatten())
      keras_model.add(Dense(128))
      keras_model.add(Activation("relu"))
      keras_model.add(Dropout(0.5))
      keras_model.add(Dense(10))
      keras_model.add(Activation("softmax"))
      return keras_model
  
imports: from optparse import OptionParser
  import sys
  from bigdl.dllib.nn.keras.keras_utils import *
  import keras.backend
label_desc: Use image node_id 2 for calling a global function with example usage: build_keras_model() and returns: keras_model