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: Replace the reads stored by this reader.
docstr_tok: ["Replace","the","reads","stored","by","this","reader","."]
code: def replace_reads(self, reads, is_sorted=False):
      """Replace the reads stored by this reader."""
      self.reads = reads
      self.is_sorted = is_sorted
  
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 2 for calling the InMemorySamReader obj's underlying member method code with example usage: obj.replace_reads(reads, is_sorted) without return types