code: def create_train_feature_set_input_fn(self):
      def input_fn(mode):
          if mode == tf.estimator.ModeKeys.TRAIN:
              image_set = self.get_raw_image_set(with_label=True)
              feature_set = FeatureSet.image_frame(
                  image_set.to_image_frame()
              )
              train_transformer = ChainedPreprocessing(
                  [
                      ImageBytesToMat(),
                      ImageResize(256, 256),
                      ImageRandomCrop(224, 224),
                      ImageRandomPreprocessing(ImageHFlip(), 0.5),
                      ImageChannelNormalize(
                          0.485, 0.456, 0.406, 0.229, 0.224, 0.225
                      ),
                      ImageMatToTensor(to_RGB=True, format="NHWC"),
                      ImageSetToSample(
                          input_keys=["imageTensor"],
                          target_keys=["label"],
                      ),
                  ]
              )
              feature_set = feature_set.transform(train_transformer)
              feature_set = feature_set.transform(
                  ImageFeatureToSample()
              )
              training_dataset = TFDataset.from_feature_set(
                  feature_set,
                  features=(tf.float32, [224, 224, 3]),
                  labels=(tf.int32, [1]),
                  batch_size=8,
              )
              return training_dataset
          else:
              raise NotImplementedError
  
      return input_fn
  
imports: import pytest
  from bigdl.orca.test_zoo_utils import ZooTestCase
  import tensorflow
  from bigdl.dllib.feature.common import ChainedPreprocessing, FeatureSet
  from bigdl.dllib.feature.image import *
  from bigdl.orca.tfpark import TFDataset, TFEstimator
  from bigdl.orca.tfpark import ZooOptimizer
label_desc: Use image node_id 12 for calling the TestTFParkEstimator obj's underlying member method code with example usage: obj.create_train_feature_set_input_fn() and returns: input_fn, training_dataset