code: def test_sequential(self):
      n_samples_train = self.TRAIN_TOTAL_SAMPLES
      n_samples_valid = self.TEST_TOTAL_SAMPLES
      # prepare data
      img_x, img_y = self.x_train.shape[1], self.x_train.shape[2]
      x_train = self.x_train.reshape(-1, img_x, img_y, 1)[
          :n_samples_train
      ]
      x_valid = self.x_valid.reshape(-1, img_x, img_y, 1)[
          :n_samples_valid
      ]
      y_train = self.y_train[:n_samples_train]
      y_valid = self.y_valid[:n_samples_valid]
      input_shape = (img_x, img_y, 1)
      # define the model as usual.
      model = Sequential()
      model.add(
          Conv2D(
              filters=space.Categorical(32, 64),
              kernel_size=space.Categorical(3, 5),
              strides=space.Categorical(1, 2),
              activation=space.Categorical("relu", "linear"),
              input_shape=input_shape,
          )
      )
      model.add(Flatten())
      model.add(Dense(10, activation="softmax"))
      model.compile(
          loss="sparse_categorical_crossentropy",
          optimizer=Adam(learning_rate=0.0001),
          metrics=["accuracy"],
      )
      # run hpo
      model.search(
          n_trials=2,
          target_metric="accuracy",
          direction="maximize",
          x=x_train,
          y=y_train,
          validation_data=(x_valid, y_valid),
          shuffle=True,
          # batch_size=128,
          batch_size=space.Int(128, 256, prefix="global"),
          epochs=2,
      )
      study = model.search_summary()
      assert study.best_trial
      assert (
          "filters" + space.SPLITTER + "choice"
          in study.best_trial.params
      )
      assert (
          "kernel_size" + space.SPLITTER + "choice"
          in study.best_trial.params
      )
      assert (
          "strides" + space.SPLITTER + "choice"
          in study.best_trial.params
      )
      assert "global:batch_size" in study.best_trial.params
      model.fit(
          x_train,
          y_train,
          validation_data=(x_valid, y_valid),
          shuffle=True,
          batch_size=128,
          epochs=2,
          verbose=False,
      )
  
      # print(model.summary())
      score = model.evaluate(x_valid, y_valid, verbose=0)
  
imports: import pytest
  from unittest import TestCase
  import bigdl.nano.automl
  import tensorflow
  import tensorflow.keras
  import numpy
  import bigdl.nano.automl.hpo.space
  from bigdl.nano.tf.keras import Input
  from bigdl.nano.tf.keras.layers import Dense, Conv2D, Flatten, Dropout
  from bigdl.nano.automl.tf.keras import Model, Sequential
  from bigdl.nano.tf.optimizers import Adam, RMSprop
  import bigdl.nano.automl.hpo
  from bigdl.nano.automl.hpo.backend import PrunerType, SamplerType
label_desc: Use image node_id 4 for calling the TestUseCases obj's underlying member method code with example usage: obj.test_sequential() without return types