code: def delete(obj, authorize=None):
      def _token_instructions(flow_name, prev_user):
          obj.echo(
              "There is an existing version of *%s* on AWS Step "
              "Functions 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(
              "    step-functions delete --authorize MY_TOKEN",
              fg="green",
          )
          obj.echo(
              'See "Organizing Results" at docs.metaflow.org for more '
              "information about production tokens."
          )
  
      validate_token(
          obj.state_machine_name,
          obj.token_prefix,
          authorize,
          _token_instructions,
      )
  
      obj.echo(
          "Deleting AWS Step Functions state machine *{name}*...".format(
              name=obj.state_machine_name
          ),
          bold=True,
      )
      schedule_deleted, sfn_deleted = StepFunctions.delete(
          obj.state_machine_name
      )
  
      if schedule_deleted:
          obj.echo(
              "Deleting Amazon EventBridge rule *{name}* as well...".format(
                  name=obj.state_machine_name
              ),
              bold=True,
          )
      if sfn_deleted:
          obj.echo(
              "Deleting the AWS Step Functions state machine may take a while. "
              "Deploying the flow again to AWS Step Functions 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
  from metaflow._vendor import click
  from hashlib import sha1
  import json
  import re
  from metaflow import current, decorators, parameters, JSONType
  from metaflow.metaflow_config import SERVICE_VERSION_CHECK, SFN_STATE_MACHINE_PREFIX, UI_URL
  from metaflow.exception import MetaflowException, MetaflowInternalError
  from metaflow.package import MetaflowPackage
  from metaflow.plugins.aws.batch.batch_decorator import BatchDecorator
  from metaflow.tagging_util import validate_tags
  from metaflow.util import get_username, to_bytes, to_unicode, version_parse
  from .step_functions import StepFunctions
  from .production_token import load_token, store_token, new_token
label_desc: Use image node_id 10 for calling a global function with example usage: delete(obj, authorize) without return types