code: def delete(obj, authorize=None):
      def _token_instructions(flow_name, prev_user):
          obj.echo(
              "There is an existing version of *%s* on Argo Workflows which was "
              "deployed by the user *%s*." % (flow_name, prev_user)
          )
          obj.echo(
              "To delete this flow, you need to use the same production token that they used."
          )
          obj.echo(
              "Please reach out to them to get the token. Once you have it, call "
              "this command:"
          )
          obj.echo(
              "    argo-workflows delete --authorize MY_TOKEN",
              fg="green",
          )
          obj.echo(
              'See "Organizing Results" at docs.metaflow.org for more information '
              "about production tokens."
          )
  
      validate_token(
          obj.workflow_name,
          obj.token_prefix,
          authorize,
          _token_instructions,
      )
      obj.echo(
          "Deleting workflow *{name}*...".format(
              name=obj.workflow_name
          ),
          bold=True,
      )
  
      (
          schedule_deleted,
          sensor_deleted,
          workflow_deleted,
      ) = ArgoWorkflows.delete(obj.workflow_name)
  
      if schedule_deleted:
          obj.echo(
              "Deleting cronworkflow *{name}*...".format(
                  name=obj.workflow_name
              ),
              bold=True,
          )
  
      if sensor_deleted:
          obj.echo(
              "Deleting sensor *{name}*...".format(
                  name=obj.workflow_name
              ),
              bold=True,
          )
  
      if workflow_deleted:
          obj.echo(
              "Deleting Kubernetes resources may take a while. "
              "Deploying the flow again to Argo Workflows while the delete is in-flight will fail."
          )
          obj.echo(
              "In-flight executions will not be affected. "
              "If necessary, terminate them manually."
          )
  
imports: import base64
  import json
  import platform
  import re
  import sys
  from hashlib import sha1
  from metaflow import JSONType, current, decorators, parameters
  from metaflow._vendor import click
  from metaflow.exception import MetaflowException, MetaflowInternalError
  from metaflow.metaflow_config import ARGO_WORKFLOWS_UI_URL, KUBERNETES_NAMESPACE, SERVICE_VERSION_CHECK, UI_URL
  from metaflow.package import MetaflowPackage
  from metaflow.plugins.aws.step_functions.production_token import load_token, new_token, store_token
  from metaflow.plugins.environment_decorator import EnvironmentDecorator
  from metaflow.plugins.kubernetes.kubernetes_decorator import KubernetesDecorator
  from metaflow.tagging_util import validate_tags
  from metaflow.util import get_username, to_bytes, to_unicode, version_parse
  from .argo_workflows import ArgoWorkflows
label_desc: Use image node_id 10 for calling a global function with example usage: delete(obj, authorize) without return types