class_docstr: An `IndexedFastaReader` getting its bases from an in-memory data structure.
  
  An `InMemoryFastaReader` provides the same API as `IndexedFastaReader` but
  doesn't fetch its data from an on-disk FASTA file but rather fetches the bases
  from an in-memory cache containing (chromosome, start, bases) tuples.
  
  In particular, the `query(Range(chrom, start, end))` operation fetches bases
  from the tuple where `chrom` == chromosome, and then from the bases where the
  first base of bases starts at start. If start > 0, then the bases string is
  assumed to contain bases starting from that position in the region. For
  example, the record ('1', 10, 'ACGT') implies that
  `query(ranges.make_range('1', 11, 12))` will return the base 'C', as the 'A'
  base is at position 10. This makes it straightforward to cache a small region
  of a full chromosome without having to store the entire chromosome sequence in
  memory (potentially big!).
docstr: Returns whether the region is contained in this FASTA file.
docstr_tok: ["Returns","whether","the","region","is","contained","in","this","FASTA","file","."]
code: def is_valid(self, region):
      """Returns whether the region is contained in this FASTA file."""
      return self._reader.is_valid_interval(region)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import six
  from etils import epath
  from third_party.nucleus.io import genomics_reader
  from third_party.nucleus.io.python import reference
  from third_party.nucleus.protos import fasta_pb2
  from third_party.nucleus.protos import reference_pb2
  from third_party.nucleus.util import ranges
label_desc: Use image node_id 4 for calling the InMemoryFastaReader obj's underlying member method code with example usage: obj.is_valid(region) and returns: self