class_docstr: A GenomicsReader that reads protocol buffers from a TFRecord file.
  
  Example usage:
    reader = TFRecordReader('/tmp/my_file.tfrecords.gz',
                            proto=tensorflow.Example)
    for example in reader:
      process(example)
  
  Note that TFRecord files do not have headers, and do not need
  to be wrapped in a "with" block.
class_docstr_tok: ["A","GenomicsReader","that","reads","protocol","buffers","from","a","TFRecord","file",".","Example","usage",":","reader","=","TFRecordReader","(","'\/tmp\/my_file.tfrecords.gz","'",",","proto=tensorflow.Example",")","for","example","in","reader",":","process","(","example",")","Note","that","TFRecord","files","do","not","have","headers",",","and","do","not","need","to","be","wrapped","in","a","``","with","''","block","."]
docstr: Initializes the TFRecordReader.
  
  Args:
    input_path:  The filename of the file to read.
    proto:  The protocol buffer type the TFRecord file is expected to
      contain.  For example, variants_pb2.Variant or reads_pb2.Read.
    compression_type:  Either 'ZLIB', 'GZIP', '' (uncompressed), or
      None.  If None, __init__ will guess the compression type based on
      the input_path's suffix.
  
  Raises:
    IOError: if there was any problem opening input_path for reading.
docstr_tok: ["Initializes","the","TFRecordReader",".","Args",":","input_path",":","The","filename","of","the","file","to","read",".","proto",":","The","protocol","buffer","type","the","TFRecord","file","is","expected","to","contain",".","For","example",",","variants_pb2.Variant","or","reads_pb2.Read",".","compression_type",":","Either","'ZLIB","'",",","'GZIP","'",",","``","(","uncompressed",")",",","or","None",".","If","None",",","__init__","will","guess","the","compression","type","based","on","the","input_path","'s","suffix",".","Raises",":","IOError",":","if","there","was","any","problem","opening","input_path","for","reading","."]
code: def __init__(self, input_path, proto, compression_type=None):
      """Initializes the TFRecordReader.
  
      Args:
        input_path:  The filename of the file to read.
        proto:  The protocol buffer type the TFRecord file is expected to
          contain.  For example, variants_pb2.Variant or reads_pb2.Read.
        compression_type:  Either 'ZLIB', 'GZIP', '' (uncompressed), or
          None.  If None, __init__ will guess the compression type based on
          the input_path's suffix.
  
      Raises:
        IOError: if there was any problem opening input_path for reading.
      """
      super(TFRecordReader, self).__init__()
  
      self.input_path = input_path
      self.proto = proto
      self.header = None
  
      if compression_type is None:
          compression_type = (
              "GZIP" if input_path.endswith(".gz") else ""
          )
  
      self.reader = tfrecord_reader.TFRecordReader.from_file(
          input_path, compression_type
      )
      if self.reader is None:
          raise IOError(
              errno.EIO,
              "Error trying to open %s for reading" % input_path,
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import errno
  from absl import logging
  import six
  from third_party.nucleus.io.python import tfrecord_reader
label_desc: Use image node_id 1 to create a new TFRecordReader object from inherited base classes: GenomicsReader with example: obj = TFRecordReader(input_path, proto, compression_type)