code: def configure_kubernetes(existing_env):
      empty_profile = False
      if not existing_env:
          empty_profile = True
      env = {}
  
      # Set K8S Namespace
      env["METAFLOW_KUBERNETES_NAMESPACE"] = click.prompt(
          cyan("[METAFLOW_KUBERNETES_NAMESPACE]")
          + yellow(" (optional)")
          + " Kubernetes Namespace ",
          default="default",
          show_default=True,
      )
  
      # Set K8S SA
      env["METAFLOW_KUBERNETES_SERVICE_ACCOUNT"] = click.prompt(
          cyan("[METAFLOW_KUBERNETES_SERVICE_ACCOUNT]")
          + yellow(" (optional)")
          + " Kubernetes Service Account ",
          default="default",
          show_default=True,
      )
  
      # Set default Docker repository for K8S jobs.
      env["METAFLOW_KUBERNETES_CONTAINER_REGISTRY"] = click.prompt(
          cyan("[METAFLOW_KUBERNETES_CONTAINER_REGISTRY]")
          + yellow(" (optional)")
          + " Default Docker image repository for K8S "
          + "jobs. If nothing is specified, "
          + "dockerhub (hub.docker.com/) is "
          + "used as default.",
          default=existing_env.get(
              "METAFLOW_KUBERNETES_CONTAINER_REGISTRY", ""
          ),
          show_default=True,
      )
      # Set default Docker image for K8S jobs.
      env["METAFLOW_KUBERNETES_CONTAINER_IMAGE"] = click.prompt(
          cyan("[METAFLOW_KUBERNETES_CONTAINER_IMAGE]")
          + yellow(" (optional)")
          + " Default Docker image for K8S jobs. "
          + "If nothing is specified, an appropriate "
          + "python image is used as default.",
          default=existing_env.get(
              "METAFLOW_KUBERNETES_CONTAINER_IMAGE", ""
          ),
          show_default=True,
      )
      # Set default Kubernetes secrets to source into pod envs
      env["METAFLOW_KUBERNETES_SECRETS"] = click.prompt(
          cyan("[METAFLOW_KUBERNETES_SECRETS]")
          + yellow(" (optional)")
          + " Comma-delimited list of secret names. Jobs will"
          " gain environment variables from these secrets. ",
          default=existing_env.get("METAFLOW_KUBERNETES_SECRETS", ""),
          show_default=True,
      )
  
      return env
  
imports: import json
  import os
  import sys
  from os.path import expanduser
  from metaflow.util import to_unicode
  from metaflow._vendor import click
  from metaflow.util import to_unicode
  from .util import echo_always, makedirs
label_desc: Use image node_id 27 for calling a global function with example usage: configure_kubernetes(existing_env) and returns: env