code: def ssl_server(
      ssl_creds: SSLCredPaths,
  ) -> Iterator[http.server.HTTPServer]:
      class MyServer(http.server.BaseHTTPRequestHandler):
          def do_GET(self):  # noqa: N802
              self.send_response(200)
              self.end_headers()
              self.wfile.write(b"Hello, world!")
  
      httpd = http.server.HTTPServer(("localhost", 0), MyServer)
  
      context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
      context.load_cert_chain(
          certfile=ssl_creds.cert, keyfile=ssl_creds.key
      )
  
      httpd.socket = context.wrap_socket(httpd.socket, server_side=True)
  
      threading.Thread(target=httpd.serve_forever, daemon=True).start()
  
      yield httpd
  
      httpd.shutdown()
  
imports: import contextlib
  import dataclasses
  import http.server
  import os
  import ssl
  import sys
  import threading
  from pathlib import Path
  from typing import Callable, Iterator, Mapping
  from unittest.mock import patch
  import pytest
  import requests
  import wandb.apis
  import wandb.env
label_desc: Use image node_id 2 for calling a global function with example usage: ssl_server(ssl_creds) without return types