code: def run_test_server(
      address: Tuple[str, int],
      cert: str = UNTRUSTED_CERT,
      key: str = UNTRUSTED_KEY,
  ) -> Iterator[str]:
      server = http.server.HTTPServer(
          address, http.server.SimpleHTTPRequestHandler
      )
  
      server.socket = ssl.wrap_socket(
          server.socket,
          keyfile=key,
          certfile=cert,
          server_side=True,
      )
  
      thread = threading.Thread(target=server.serve_forever, args=[0.1])
      thread.start()
      try:
          host = address[0]
          port = address[1]
          yield f"https://{host}:{port}"
      finally:
          server.shutdown()
          thread.join()
  
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 1 for calling a global function with example usage: run_test_server(address, cert, key) without return types