code: def default_load(
      master_url: str,
      explicit_path: Optional[str] = None,
      explicit_cert_name: Optional[str] = None,
      explicit_noverify: bool = False,
  ) -> Cert:
      """
      default_load takes as input the user-specified certificate-related configurations, reads
      environment variable configs, reads configs from the default store on the filesystem, and
      returns the resulting Cert object.
  
      Having all of the default loading logic in one function makes it easy to invoke the same logic
      in both the cli and the python sdk.
      """
      # Any explicit args causes us to ignore environment variables and defaults.
      if explicit_path or explicit_cert_name or explicit_noverify:
          if explicit_path:
              with open(explicit_path, "r") as f:
                  cert_pem = f.read()  # type: Optional[str]
          else:
              cert_pem = None
          return Cert(
              cert_pem=cert_pem,
              noverify=explicit_noverify,
              name=explicit_cert_name,
          )
  
      # Let any environment variable for CERT_FILE override the default store.
      env_path = os.environ.get("DET_MASTER_CERT_FILE")
      noverify = False
      cert_pem = None
      if env_path:
          if env_path.lower() == "noverify":
              noverify = True
          elif os.path.exists(env_path):
              with open(env_path, "r") as f:
                  cert_pem = f.read()
          else:
              logger.warning(
                  f"DET_MASTER_CERT_FILE={env_path} path not found; continuing without cert"
              )
      else:
          # Otherwise, look in the default location for cert_pem.
          store_path = default_store()
          cert_store = CertStore(path=store_path)
          old_path = util.get_config_path().joinpath("master.crt")
          maybe_shim_old_cert_store(old_path, store_path, master_url)
          cert_pem = cert_store.get_cert(master_url)
  
      env_name = os.environ.get("DET_MASTER_CERT_NAME")
      if env_name == "":
          env_name = None
  
      return Cert(cert_pem=cert_pem, noverify=noverify, name=env_name)
  
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 a global function with example usage: default_load(master_url, explicit_path, explicit_cert_name, explicit_noverify) and returns: Cert, Cert