code: def create_input_fn(self):
      def input_fn(mode):
          np.random.seed(20)
          x = np.random.rand(20, 10)
          y = np.random.randint(0, 10, (20))
  
          rdd_x = self.sc.parallelize(x)
          rdd_y = self.sc.parallelize(y)
  
          rdd = rdd_x.zip(rdd_y)
          if mode == tf.estimator.ModeKeys.TRAIN:
              dataset = TFDataset.from_rdd(
                  rdd,
                  features=(tf.float32, [10]),
                  labels=(tf.int32, []),
                  batch_size=4,
              )
          elif mode == tf.estimator.ModeKeys.EVAL:
              dataset = TFDataset.from_rdd(
                  rdd,
                  features=(tf.float32, [10]),
                  labels=(tf.int32, []),
                  batch_per_thread=4,
              )
          else:
              dataset = TFDataset.from_rdd(
                  rdd_x, features=(tf.float32, [10]), batch_per_thread=4
              )
          return dataset
  
      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 4 for calling the TestTFParkEstimator obj's underlying member method code with example usage: obj.create_input_fn() and returns: input_fn, dataset