code: def get_data(dataset):
      from bigdl.dataset import mnist
  
      (images_data, labels_data) = mnist.read_data_sets(
          "/tmp/mnist", dataset
      )
      images_data = (images_data - mnist.TRAIN_MEAN) / mnist.TRAIN_STD
      return (images_data, labels_data.astype(np.int32))
  
imports: import tensorflow
  import numpy
  from zoo import init_nncontext
  from zoo.tfpark import TFDataset, TFEstimator
  from zoo.tfpark import ZooOptimizer
label_desc: Use image node_id 1 for calling a global function with example usage: get_data(dataset) and returns: images_data,  labels_data