code: def create_nginx_config(incoming_trust, outgoing_trust, key, cert):
      http_config_file = "ssl-config-http.conf"
      proxy_config_file = "ssl-config-proxy.conf"
      with open(proxy_config_file, "w") as proxy, open(
          http_config_file, "w"
      ) as http:
          proxy.write(
              f"proxy_ssl_certificate         /ssl-config/{cert};\n"
          )
          proxy.write(
              f"proxy_ssl_certificate_key     /ssl-config/{key};\n"
          )
          proxy.write(
              f'proxy_ssl_trusted_certificate /ssl-config/{outgoing_trust["trust"]};\n'
          )
          proxy.write("proxy_ssl_verify              on;\n")
          proxy.write("proxy_ssl_verify_depth        1;\n")
          proxy.write("proxy_ssl_session_reuse       on;\n")
  
          http.write(f"ssl_certificate /ssl-config/{cert};\n")
          http.write(f"ssl_certificate_key /ssl-config/{key};\n")
          http.write(
              f'ssl_client_certificate /ssl-config/{incoming_trust["trust"]};\n'
          )
          http.write("ssl_verify_client optional;\n")
          # FIXME: mTLS
          # http.write('ssl_verify_client on;\n')
      return [http_config_file, proxy_config_file]
  
file_path: hail/tls/create_certs.py
imports: import argparse
  import json
  import shutil
  import subprocess
  import tempfile
  import yaml
label_desc: Use image node_id 5 for calling a global function with example usage: create_nginx_config(incoming_trust, outgoing_trust, key, cert) and returns: list