[docs]@dataclassclassFailureFilterStash(DelegateStash,PrimeableStash):"""Filter's instances of :class:`~.zensols.util.fail.Failure`. It does this by reading all load all items of the :obj:`delegate` stash and tracking the keys of which are failures. """key_path:Path=field()"""The path of the file where valid keys are stored."""def__post_init__(self):super().__post_init__()self._valid_keys=PersistedWork(self.key_path,self,mkdir=True)@persisted('_valid_keys')def_get_valid_keys(self)->Set[str]:valid_keys:Set[str]=set()fork,vinself.delegate.items():ifnotisinstance(v,Failure):valid_keys.add(k)returnfrozenset(valid_keys)