code: def test_custom_tls_certs() -> None:
      with run_test_server(
          ("127.0.0.1", 12345), cert=UNTRUSTED_CERT, key=UNTRUSTED_KEY
      ) as untrusted_url:
          with open(UNTRUSTED_CERT) as f:
              untrusted_pem = f.read()
  
          for kwargs, raises in [
              ({"noverify": True}, False),
              ({"noverify": False}, True),
              ({"cert_pem": untrusted_pem}, False),
              ({}, True),
          ]:
              assert isinstance(kwargs, dict)
              cert = certs.Cert(**kwargs)
  
              # Trusted domains should always work.
              request.get(
                  TRUSTED_DOMAIN, "", authenticated=False, cert=cert
              )
  
              with contextlib.ExitStack() as ctx:
                  if raises:
                      ctx.enter_context(
                          pytest.raises(requests.exceptions.SSLError)
                      )
                  request.get(
                      untrusted_url, "", authenticated=False, cert=cert
                  )
  
file_path: determined/harness/tests/common/test_tls.py
imports: import contextlib
  import http.server
  import os
  import ssl
  import threading
  from typing import Iterator, Tuple
  import pytest
  import requests
  from determined.common.api import certs, request
label_desc: Use image node_id 2 for calling a global function with example usage: test_custom_tls_certs() without return types