code: def upstream_transport_socket(proxy: str, verify_ca: bool) -> dict:
      if verify_ca:
          return {
              "name": "envoy.transport_sockets.tls",
              "typed_config": {
                  "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext",
                  "common_tls_context": {
                      "tls_certificates": [
                          {
                              "certificate_chain": {
                                  "filename": f"/ssl-config/{proxy}-cert.pem"
                              },
                              "private_key": {
                                  "filename": f"/ssl-config/{proxy}-key.pem"
                              },
                          },
                      ],
                  },
                  "validation_context": {
                      "filename": f"/ssl-config/{proxy}-outgoing.pem"
                  },
              },
          }
  
      return {
          "name": "envoy.transport_sockets.tls",
          "typed_config": {
              "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext",
              "common_tls_context": {
                  "tls_certificates": [],
              },
              "validation_context": {
                  "trust_chain_verification": "ACCEPT_UNTRUSTED",
              },
          },
      }
  
file_path: hail/ci/ci/envoy.py
imports: import os
  import sys
  from typing import Dict, List
  import yaml
label_desc: Use image node_id 12 for calling a global function with example usage: upstream_transport_socket(proxy, verify_ca) and returns: dict, dict