code: def __generate_keras_model(
      self, functional_api, input_data, output_layer
  ):
      if functional_api:
          keras_model = self.__generate_model(input_data, output_layer)
      else:
          keras_model = self.__generate_sequence(
              input_data, output_layer
          )
      return keras_model
  
imports: from __future__ import print_function
  import numpy
  from keras.models import Sequential, Model
  from keras.layers.core import *
  from keras.layers.convolutional import *
  from keras.layers import Dense, Dropout, Input
  from keras.optimizers import RMSprop
  from bigdl.dllib.utils.common import *
  from bigdl.dllib.keras.converter import *
  from bigdl.dllib.keras.converter import WeightLoader, WeightsConverter
  import numpy
  from unittest import TestCase
  import keras
  from bigdl.dllib.nn.keras.keras_utils import *
label_desc: Use image node_id 7 for calling the BigDLTestCase obj's underlying member method code with example usage: obj.__generate_keras_model(functional_api, input_data, output_layer) and returns: keras_model