code: def make_dataset(
      self,
      num_epochs,
      compression_type=None,
      buffer_size=None,
      symbolic_checkpoint=False,
  ):
      filenames = self._createFiles()
      if compression_type == "ZLIB":
          zlib_files = []
          for i, fn in enumerate(filenames):
              with open(fn, "rb") as f:
                  cdata = zlib.compress(f.read())
                  zfn = os.path.join(
                      self.get_temp_dir(), "tfrecord_%s.z" % i
                  )
                  with open(zfn, "wb") as f:
                      f.write(cdata)
                  zlib_files.append(zfn)
          filenames = zlib_files
  
      elif compression_type == "GZIP":
          gzip_files = []
          for i, fn in enumerate(self._filenames):
              with open(fn, "rb") as f:
                  gzfn = os.path.join(
                      self.get_temp_dir(), "tfrecord_%s.gz" % i
                  )
                  with gzip.GzipFile(gzfn, "wb") as gzf:
                      gzf.write(f.read())
                  gzip_files.append(gzfn)
          filenames = gzip_files
  
      dataset = readers.TFRecordDataset(
          filenames, compression_type, buffer_size=buffer_size
      ).repeat(num_epochs)
      if symbolic_checkpoint:
          options = options_lib.Options()
          options.experimental_symbolic_checkpoint = symbolic_checkpoint
          dataset = dataset.with_options(options)
      return dataset
  
imports: import gzip
  import os
  import pathlib
  import zlib
  from absl.testing import parameterized
  from tensorflow.python.data.kernel_tests import checkpoint_test_base
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.kernel_tests import tf_record_test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import options
  from tensorflow.python.data.ops import readers
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import constant_op
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the TFRecordDatasetCheckpointTest obj's underlying member method code with example usage: obj.make_dataset(num_epochs, compression_type, buffer_size, symbolic_checkpoint) and returns: dataset