code: def _generate_image_data(data_num, img_shape):
      images = []
      labels = []
      for i in range(0, data_num):
          features = np.random.uniform(0, 1, img_shape)
          label = np.array([2])
          images.append(features)
          labels.append(label)
      return images, labels
  
file_path: BigDL/python/dllib/test/bigdl/estimator/test_estimator.py
imports: import pytest
  from pyspark.ml import Pipeline
  from bigdl.dllib.estimator import *
  from bigdl.dllib.nn.layer import Sequential, View, Linear, LogSoftMax, SpatialConvolution
  from bigdl.dllib.nn.criterion import ClassNLLCriterion
  from bigdl.dllib.optim.optimizer import *
  from bigdl.dllib.utils.common import EvaluatedResult
  from test.bigdl.test_zoo_utils import ZooTestCase
  from bigdl.dllib.feature.common import FeatureSet
  from bigdl.dllib.nncontext import init_nncontext, init_spark_conf, ZooContext
  from bigdl.dllib.utils.file_utils import Sample
label_desc: Use image node_id 4 for calling the TestEstimator obj's underlying member method code with example usage: obj._generate_image_data(data_num, img_shape) and returns: images,  labels