code: def __generate_sequence(self, input_data, output_layer):
      seq = Sequential()
      if not isinstance(output_layer, keras.engine.Merge):
          seq.add(
              keras.layers.InputLayer(
                  batch_input_shape=input_data.shape
              )
          )
      seq.add(output_layer)
      return seq
  
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 4 for calling the BigDLTestCase obj's underlying member method code with example usage: obj.__generate_sequence(input_data, output_layer) and returns: seq