class_docstr: A GenomicsReader that dispatches based on the file extension.
  
  If '.tfrecord' is present in the filename, a TFRecordReader is used.
  Otherwise, a native reader is.
  
  Subclasses of DispatchingGenomicsReader must define the following methods:
    * _native_reader()
    * _record_proto()
class_docstr_tok: ["A","GenomicsReader","that","dispatches","based","on","the","file","extension",".","If","'.tfrecord","'","is","present","in","the","filename",",","a","TFRecordReader","is","used",".","Otherwise",",","a","native","reader","is",".","Subclasses","of","DispatchingGenomicsReader","must","define","the","following","methods",":","*","_native_reader","(",")","*","_record_proto","(",")"]
code: def __init__(self, input_path, **kwargs):
      super(DispatchingGenomicsReader, self).__init__()
  
      if ".tfrecord" in input_path:
          self._reader = TFRecordReader(
              input_path,
              proto=self._record_proto(),
              compression_type=kwargs.get("compression_type", None),
          )
      else:
          # Remove compression_type, if present, from the arguments we pass to the
          # native reader.
          kwargs.pop("compression_type", None)
          self._reader = self._native_reader(input_path, **kwargs)
      logging.info(
          "Reading %s with %s",
          input_path,
          self._reader.__class__.__name__,
      )
      self.header = getattr(self._reader, "header", None)
      self._post_init_hook()
  
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 DispatchingGenomicsReader object from inherited base classes: GenomicsReader with example: obj = DispatchingGenomicsReader(input_path)