docstr: Returns true if the key is in the cache and its paths exist in the store already.
docstr_tok: ["Returns","true","if","the","key","is","in","the","cache","and","its","paths","exist","in","the","store","already","."]
code: def is_cached(self, key, store):
      """Returns true if the key is in the cache and its paths exist in the store already."""
      if key not in self._key_to_dataset:
          return False
  
      dataset_idx = self._key_to_dataset[key]
      _, _, _, validation = key
      train_data_path = store.get_train_data_path(dataset_idx)
      val_data_path = store.get_val_data_path(dataset_idx)
  
      return (
          self._keys_in_use[key] > 0
          and self._dataset_to_key.get(dataset_idx) == key
          and store.is_parquet_dataset(train_data_path)
          and (
              not validation or store.is_parquet_dataset(val_data_path)
          )
      )
  
file_path: horovod/horovod/spark/common/cache.py
imports: import collections
  import contextlib
  import threading
label_desc: Use image node_id 8 for calling the TrainingDataCache obj's underlying member method code with example usage: obj.is_cached(key, store) and returns: unknown, False