code: def trigger(obj, run_id_file=None, **kwargs):
      def _convert_value(param):
          # Swap `-` with `_` in parameter name to match click's behavior
          val = kwargs.get(param.name.replace("-", "_").lower())
          if param.kwargs.get("type") == JSONType:
              val = json.dumps(val)
          elif isinstance(val, parameters.DelayedEvaluationParameter):
              val = val(return_str=True)
          return val
  
      params = {
          param.name: _convert_value(param)
          for _, param in obj.flow._get_parameters()
          if kwargs.get(param.name.replace("-", "_").lower())
          is not None
      }
  
      response = ArgoWorkflows.trigger(obj.workflow_name, params)
      run_id = "argo-" + response["metadata"]["name"]
  
      if run_id_file:
          with open(run_id_file, "w") as f:
              f.write(str(run_id))
  
      obj.echo(
          "Workflow *{name}* triggered on Argo Workflows "
          "(run-id *{run_id}*).".format(
              name=obj.workflow_name, run_id=run_id
          ),
          bold=True,
      )
  
      run_url = (
          "%s/%s/%s" % (UI_URL.rstrip("/"), obj.flow.name, run_id)
          if UI_URL
          else None
      )
  
      if run_url:
          obj.echo(
              "See the run in the UI at %s" % run_url,
              bold=True,
          )
  
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 9 for calling a global function with example usage: trigger(obj, run_id_file) and returns: val