class_docstr: TFRecordIterator test
class_docstr_tok: ["TFRecordIterator","test"]
docstr: test Iterator
docstr_tok: ["test","Iterator"]
code: def testIterator(self):
      """test Iterator"""
      records = [self._Record(0, i) for i in range(self._num_records)]
      options = tf_record.TFRecordOptions(TFRecordCompressionType.ZLIB)
      fn = self._WriteRecordsToFile(
          records, "compressed_records", options
      )
  
      reader = tf_record.tf_record_iterator(fn, options)
      for expected in records:
          record = next(reader)
          self.assertEqual(expected, record)
      with self.assertRaises(StopIteration):
          record = next(reader)
  
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 2 for calling the TFRecordIteratorTest obj's underlying member method code with example usage: obj.testIterator() without return types