code: def get_data():
      def f(dp):
          im = dp[0][:, :, None]
          onehot = np.eye(10)[dp[1]]
          return [im, onehot]
  
      train = BatchData(MapData(dataset.Mnist("train"), f), 128)
      test = BatchData(MapData(dataset.Mnist("test"), f), 256)
      return train, test
  
file_path: tensorpack/examples/keras/mnist-keras-v2.py
imports: import numpy
  import tensorflow
  from tensorflow import keras
  from tensorpack import QueueInput
  from tensorpack.callbacks import ModelSaver
  from tensorpack.contrib.keras import KerasModel
  from tensorpack.dataflow import BatchData, MapData, dataset
  from tensorpack.utils import logger
label_desc: Use image node_id 1 for calling a global function with example usage: get_data() and returns: train,  test, list