code: def test_write_read_imagenet(self):
      raw_data = os.path.join(
          self.resource_path, "imagenet_to_tfrecord"
      )
      temp_dir = tempfile.mkdtemp()
      try:
          write_tfrecord(
              format="imagenet",
              imagenet_path=raw_data,
              output_path=temp_dir,
          )
          data_dir = os.path.join(temp_dir, "train")
          train_dataset = read_tfrecord(
              format="imagenet", path=data_dir, is_training=True
          )
          train_dataset.take(1)
      finally:
          shutil.rmtree(temp_dir)
  
file_path: BigDL/python/orca/test/bigdl/orca/tfpark/test_tfrecord.py
imports: import tempfile
  import os.path
  import pytest
  from unittest import TestCase
  import shutil
  from bigdl.dllib.nncontext import *
  from bigdl.orca.data.image import write_tfrecord, read_tfrecord
label_desc: Use image node_id 2 for calling the TestTFRecord obj's underlying member method code with example usage: obj.test_write_read_imagenet() without return types