class_docstr: TFRecordWriter close and flush tests
class_docstr_tok: ["TFRecordWriter","close","and","flush","tests"]
code: def testFlushAndRead(self):
      records = list(map(self._Record, range(self._num_records)))
      for record in records:
          self._writer.write(record)
      self._writer.flush()
  
      actual = list(
          tf_record.tf_record_iterator(self._fn, self._options)
      )
      self.assertListEqual(actual, records)
  
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 5 for calling the TFRecordWriterCloseAndFlushTests obj's underlying member method code with example usage: obj.testFlushAndRead() without return types