code: def test_tfdataset_with_tfrecord(self):
      train_path = os.path.join(
          resource_path, "tfrecord/mnist_train.tfrecord"
      )
      test_path = os.path.join(
          resource_path, "tfrecord/mnist_test.tfrecord"
      )
      dataset = TFDataset.from_tfrecord_file(
          self.sc,
          train_path,
          batch_size=16,
          validation_file_path=test_path,
      )
      raw_bytes = dataset.tensors[0]
      images, labels = parse_fn(raw_bytes)
      flat = tf.layers.flatten(images)
      logits = tf.layers.dense(flat, 10)
      loss = tf.reduce_mean(
          tf.losses.sparse_softmax_cross_entropy(
              logits=logits, labels=labels
          )
      )
      opt = TFOptimizer.from_loss(loss, Adam())
      opt.optimize()
  
imports: import pytest
  from pyspark.ml.linalg import DenseVector
  from bigdl.dllib.feature.common import ChainedPreprocessing, FeatureSet
  from bigdl.dllib.feature.image import *
  from bigdl.orca.test_zoo_utils import ZooTestCase
  from bigdl.dllib.keras.optimizers import Adam
  from bigdl.orca.tfpark import TFNet, TFOptimizer
  import tensorflow
  import numpy
  import os
  from bigdl.orca.tfpark import KerasModel, TFDataset
label_desc: Use image node_id 16 for calling the TestTFDataset obj's underlying member method code with example usage: obj.test_tfdataset_with_tfrecord() without return types