class_docstr: TFRecordWriter Test
class_docstr_tok: ["TFRecordWriter","Test"]
docstr: test Write Read Gzip Files
docstr_tok: ["test","Write","Read","Gzip","Files"]
code: def testWriteReadGzipFiles(self):
      """test Write Read Gzip Files"""
      # Write uncompressed then compress manually.
      options = tf_record.TFRecordOptions(TFRecordCompressionType.NONE)
      files = self._CreateFiles(options, prefix="uncompressed")
      gzip_files = [
          self._GzipCompressFile(fn, "tfrecord_%s.gz" % i)
          for i, fn in enumerate(files)
      ]
      self._AssertFilesEqual(files, gzip_files, False)
  
      # Now write compressd and verify same.
      options = tf_record.TFRecordOptions(TFRecordCompressionType.GZIP)
      compressed_files = self._CreateFiles(options, prefix="compressed")
  
      # Note: Gzips written by TFRecordWriter add 'tfrecord_0' so
      # compressed_files can't be compared with gzip_files
  
      # Decompress compress and verify same.
      uncompressed_files = [
          self._GzipDecompressFile(fn, "tfrecord_%s.gz" % i)
          for i, fn in enumerate(compressed_files)
      ]
      self._AssertFilesEqual(uncompressed_files, files, True)
  
imports: import gzip
  import os
  import random
  import string
  import zlib
  import six
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.lib.io import tf_record
  from tensorflow.python.platform import test
  from tensorflow.python.util import compat
label_desc: Use image node_id 4 for calling the TFRecordWriterTest obj's underlying member method code with example usage: obj.testWriteReadGzipFiles() without return types