code: def create_principal(
      principal, kind, key, cert, key_store, unmanaged
  ):
      if unmanaged and namespace != "default":
          return
      incoming_trust = create_trust(principal, "incoming")
      outgoing_trust = create_trust(principal, "outgoing")
      configs = create_config(
          incoming_trust, outgoing_trust, key, cert, key_store, kind
      )
      with tempfile.NamedTemporaryFile() as k8s_secret:
          sp.check_call(
              [
                  "kubectl",
                  "create",
                  "secret",
                  "generic",
                  f"ssl-config-{principal}",
                  f"--namespace={namespace}",
                  f"--from-file={key}",
                  f"--from-file={cert}",
                  f"--from-file={key_store}",
                  f'--from-file={incoming_trust["trust"]}',
                  f'--from-file={incoming_trust["trust_store"]}',
                  f'--from-file={outgoing_trust["trust"]}',
                  f'--from-file={outgoing_trust["trust_store"]}',
                  *[f"--from-file={c}" for c in configs],
                  "--save-config",
                  "--dry-run=client",
                  "-o",
                  "yaml",
              ],
              stdout=k8s_secret,
          )
          sp.check_call(["kubectl", "apply", "-f", k8s_secret.name])
  
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 8 for calling a global function with example usage: create_principal(principal, kind, key, cert, key_store, unmanaged) without return types