class_docstr: CertStore represents a persistent file-based record of certificates, each associated with a
  particular master url.
docstr: Yields a store that can be modified, and the modified result will be written back to file.
docstr_tok: ["Yields","a","store","that","can","be","modified",",","and","the","modified","result","will","be","written","back","to","file","."]
code: def _persistent_store(self) -> Iterator[Dict["str", "str"]]:
      """
      Yields a store that can be modified, and the modified result will be written back to file.
      """
      self.path.parent.mkdir(mode=0o700, parents=True, exist_ok=True)
      # Decide on paths for a lock file and a temp files (during writing).
      temp = pathlib.Path(str(self.path) + ".temp")
      lock = str(self.path) + ".lock"
  
      with filelock.FileLock(lock):
          store = self._load_store_file()
  
          # No need for try/finally, because we don't update the file after failures.
          yield store
  
          with temp.open("w") as f:
              json.dump(store, f, indent=4, sort_keys=True)
          temp.replace(self.path)
  
imports: import atexit
  import contextlib
  import json
  import logging
  import os
  import pathlib
  import tempfile
  from typing import Dict, Iterator, Optional, Union, cast
  import certifi
  import filelock
  from determined.common import api, util
label_desc: Use image node_id 3 for calling the CertStore obj's underlying member method code with example usage: obj._persistent_store() without return types