code: def __init__(
      self,
      cert_pem: Optional[str] = None,
      noverify: bool = False,
      name: Optional[str] = None,
  ) -> None:
      if cert_pem is not None and noverify:
          raise AssertionError(
              "you cannot set cert_pem with noverify=True"
          )
  
      if name == "":
          name = None
      self._name = name
  
      if noverify:
          self._bundle = False  # type: Union[None, str, bool]
      elif cert_pem is None:
          self._bundle = None
      else:
          # Don't use NamedTemporaryFile, since it would make the file inaccessible by path on
          # Windows after this.
          # (see https://docs.python.org/3/library/tempfile.html#tempfile.NamedTemporaryFile)
          fd, combined_path = tempfile.mkstemp(
              prefix="det-master-cert-"
          )
          atexit.register(os.unlink, combined_path)
  
          with open(fd, "wb") as out:
              with open(certifi.where(), "rb") as base_certs:
                  out.write(base_certs.read())
              out.write(b"\n")
              out.write(cert_pem.encode("utf8"))
  
          self._bundle = combined_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 1 to create a new Cert object  with example: obj = Cert(cert_pem, noverify, name)