code: def internal_client_ssl_context() -> ssl.SSLContext:
      global _client_ssl_context
      if _client_ssl_context is None:
          ssl_config = _get_ssl_config()
          _client_ssl_context = ssl.create_default_context(
              purpose=Purpose.SERVER_AUTH,
              cafile=ssl_config["outgoing_trust"],
          )
          # setting cafile in `create_default_context` ignores the system default
          # certificates. We must explicitly request them again with
          # load_default_certs.
          _client_ssl_context.load_default_certs()
          _client_ssl_context.load_cert_chain(
              ssl_config["cert"],
              keyfile=ssl_config["key"],
              password=None,
          )
          _client_ssl_context.verify_mode = ssl.CERT_REQUIRED
          _client_ssl_context.check_hostname = True
      return _client_ssl_context
  
file_path: hail/hail/python/hailtop/tls.py
imports: from typing import Dict
  import logging
  import json
  import os
  import ssl
  from ssl import Purpose
label_desc: Use image node_id 4 for calling a global function with example usage: internal_client_ssl_context() and returns: _client_ssl_context