code: def make_flow(
      obj,
      token,
      name,
      tags,
      namespace,
      max_workers,
      workflow_timeout,
      workflow_priority,
      auto_emit_argo_events,
      notify_on_error,
      notify_on_success,
      notify_slack_webhook_url,
      notify_pager_duty_integration_key,
  ):
      # TODO: Make this check less specific to Amazon S3 as we introduce
      #       support for more cloud object stores.
      if obj.flow_datastore.TYPE not in ("azure", "gs", "s3"):
          raise MetaflowException(
              "Argo Workflows requires --datastore=s3 or --datastore=azure or --datastore=gs"
          )
  
      if (notify_on_error or notify_on_success) and not (
          notify_slack_webhook_url or notify_pager_duty_integration_key
      ):
          raise MetaflowException(
              "Notifications require specifying an incoming Slack webhook url via --notify-slack-webhook-url or "
              "PagerDuty events v2 integration key via --notify-pager-duty-integration-key.\n If you would like to set up "
              "notifications for your Slack workspace, follow the instructions at "
              "https://api.slack.com/messaging/webhooks to generate a webhook url.\n For notifications through PagerDuty, "
              "generate an integration key by following the instructions at "
              "https://support.pagerduty.com/docs/services-and-integrations#create-a-generic-events-api-integration"
          )
  
      # Attach @kubernetes and @environment decorator to the flow to
      # ensure that the related decorator hooks are invoked.
      decorators._attach_decorators(
          obj.flow,
          [KubernetesDecorator.name, EnvironmentDecorator.name],
      )
  
      decorators._init_step_decorators(
          obj.flow,
          obj.graph,
          obj.environment,
          obj.flow_datastore,
          obj.logger,
      )
  
      # Save the code package in the flow datastore so that both user code and
      # metaflow package can be retrieved during workflow execution.
      obj.package = MetaflowPackage(
          obj.flow, obj.environment, obj.echo, obj.package_suffixes
      )
      package_url, package_sha = obj.flow_datastore.save_data(
          [obj.package.blob], len_hint=1
      )[0]
  
      return ArgoWorkflows(
          name,
          obj.graph,
          obj.flow,
          package_sha,
          package_url,
          token,
          obj.metadata,
          obj.flow_datastore,
          obj.environment,
          obj.event_logger,
          obj.monitor,
          tags=tags,
          namespace=namespace,
          max_workers=max_workers,
          username=get_username(),
          workflow_timeout=workflow_timeout,
          workflow_priority=workflow_priority,
          auto_emit_argo_events=auto_emit_argo_events,
          notify_on_error=notify_on_error,
          notify_on_success=notify_on_success,
          notify_slack_webhook_url=notify_slack_webhook_url,
          notify_pager_duty_integration_key=notify_pager_duty_integration_key,
      )
  
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 7 for calling a global function with example usage: make_flow(obj, token, name, tags, namespace, max_workers, workflow_timeout, workflow_priority, auto_emit_argo_events, notify_on_error, notify_on_success, notify_slack_webhook_url, notify_pager_duty_integration_key) and returns: ArgoWorkflows