class_docstr: Python interface class for in-memory SAM/BAM/CRAM reader.
  
  Attributes:
    reads: list[nucleus.genomics.v1.Read]. The list of in-memory reads.
    is_sorted: bool, True if reads are sorted.
class_docstr_tok: ["Python","interface","class","for","in-memory","SAM\/BAM\/CRAM","reader",".","Attributes",":","reads",":","list","[","nucleus.genomics.v1.Read","]",".","The","list","of","in-memory","reads",".","is_sorted",":","bool",",","True","if","reads","are","sorted","."]
docstr: Returns an iterator for going through the reads in the region.
  
  Args:
    region: nucleus.genomics.v1.Range. The query region.
  
  Returns:
    An iterator over nucleus.genomics.v1.Read protos.
docstr_tok: ["Returns","an","iterator","for","going","through","the","reads","in","the","region",".","Args",":","region",":","nucleus.genomics.v1.Range",".","The","query","region",".","Returns",":","An","iterator","over","nucleus.genomics.v1.Read","protos","."]
code: def query(self, region):
      """Returns an iterator for going through the reads in the region.
  
      Args:
        region: nucleus.genomics.v1.Range. The query region.
  
      Returns:
        An iterator over nucleus.genomics.v1.Read protos.
      """
      # TODO: Add a faster query version for sorted reads.
      return (
          read
          for read in self.reads
          if utils.read_overlaps_region(read, region)
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from third_party.nucleus.io import genomics_reader
  from third_party.nucleus.io import genomics_writer
  from third_party.nucleus.io.python import sam_reader
  from third_party.nucleus.io.python import sam_writer
  from third_party.nucleus.protos import reads_pb2
  from third_party.nucleus.util import ranges
  from third_party.nucleus.util import utils
label_desc: Use image node_id 4 for calling the InMemorySamReader obj's underlying member method code with example usage: obj.query(region) and returns: unknown