class_docstr: Reads cache from the FS written by WriteAnalysisCacheToFS.
class_docstr_tok: ["Reads","cache","from","the","FS","written","by","WriteAnalysisCacheToFS","."]
docstr: Init method.
  
  Args:
    cache_base_dir: A string, the path that the cache should be stored in.
    dataset_keys: An iterable of `DatasetKey`s.
    cache_entry_keys: (Optional) An iterable of cache entry key strings. If
      provided, only cache entries that exist in `cache_entry_keys` will be
      read.
    source: (Optional) A PTransform class that takes a path argument in its
      constructor, and is used to read the cache.
code: def __init__(
      self,
      cache_base_dir: str,
      dataset_keys: Iterable[DatasetKey],
      cache_entry_keys: Optional[Iterable[bytes]] = None,
      source: Optional[object] = None,
  ):
      """Init method.
  
      Args:
        cache_base_dir: A string, the path that the cache should be stored in.
        dataset_keys: An iterable of `DatasetKey`s.
        cache_entry_keys: (Optional) An iterable of cache entry key strings. If
          provided, only cache entries that exist in `cache_entry_keys` will be
          read.
        source: (Optional) A PTransform class that takes a path argument in its
          constructor, and is used to read the cache.
      """
      self._cache_base_dir = cache_base_dir
      if not all(isinstance(d, DatasetKey) for d in dataset_keys):
          raise ValueError(
              "Expected dataset_keys to be of type DatasetKey"
          )
      self._sorted_dataset_keys = sorted(dataset_keys)
      self._filtered_cache_entry_keys = (
          None if cache_entry_keys is None else set(cache_entry_keys)
      )
      # TODO(b/37788560): Possibly use Riegeli as a default file format once
      # possible.
      self._source = (
          source if source is not None else beam.io.ReadFromTFRecord
      )
  
imports: import os
  import pickle
  import re
  import sys
  from typing import Iterable, Mapping, List, Optional, Union, Tuple
  import apache_beam
  import tensorflow
  from tfx_bsl.types import tfx_namedtuple
label_desc: Use image node_id 1 to create a new ReadAnalysisCacheFromFS object from inherited base classes: beam with example: obj = ReadAnalysisCacheFromFS(cache_base_dir, dataset_keys, cache_entry_keys, source)