code: def maybe_shim_old_cert_store(
      old_path: pathlib.Path, new_path: pathlib.Path, master_url: str
  ) -> None:
      """
      maybe_shim_old_cert_store will detect when an old v0 cert store is present and will shim it to
      a v1 cert store.
      """
      if not old_path.exists():
          return None
  
      # Only try to shim when ONLY the old path exists.
      if not new_path.exists():
          with old_path.open("r") as f:
              pem_content = f.read()
          store = {master_url: pem_content}
          with new_path.open("w") as f:
              json.dump(store, f, indent=4, sort_keys=True)
  
      old_path.unlink()
  
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 1 for calling a global function with example usage: maybe_shim_old_cert_store(old_path, new_path, master_url) and returns: None