code: def test_train_dataset(self):
      images = []
      labels = []
      for i in range(0, 8):
          features = np.random.uniform(0, 1, (200, 200, 3))
          label = np.array([2])
          images.append(features)
          labels.append(label)
      image_frame = DistributedImageFrame(
          self.sc.parallelize(images), self.sc.parallelize(labels)
      )
  
      transformer = Pipeline(
          [
              BytesToMat(),
              Resize(256, 256),
              CenterCrop(224, 224),
              ChannelNormalize(
                  0.485, 0.456, 0.406, 0.229, 0.224, 0.225
              ),
              MatToTensor(),
              ImageFrameToSample(target_keys=["label"]),
          ]
      )
      data_set = DataSet.image_frame(image_frame).transform(transformer)
  
      model = BSequential()
      model.add(
          BLayer.Convolution2D(1, 5, 5, input_shape=(3, 224, 224))
      )
      model.add(BLayer.Reshape((1 * 220 * 220,)))
      model.add(BLayer.Dense(20, activation="softmax"))
      model.compile(
          optimizer="sgd",
          loss="sparse_categorical_crossentropy",
          metrics=["accuracy"],
      )
      model.fit(
          data_set, batch_size=8, nb_epoch=2, validation_data=data_set
      )
  
imports: import pytest
  from test.bigdl.test_utils import BigDLTestCase
  import bigdl.dllib.nn.keras.layers.layer
  import keras.layers
  import keras.backend
  from bigdl.dllib.keras.converter import WeightsConverter
  from bigdl.dllib.feature.dataset.dataset import *
  from bigdl.dllib.nn.keras.layers.topology import Model
  from bigdl.dllib.nn.keras.layers.topology import Sequential
  from keras.engine import merge, Model
  from keras.models import Sequential
label_desc: Use image node_id 13 for calling the TestKerasAPI obj's underlying member method code with example usage: obj.test_train_dataset() without return types