code: def add_custom_parameters(deploy_mode=False):
      # deploy_mode determines whether deploy-time functions should or should
      # not be evaluated for this command
      def wrapper(cmd):
          # Iterate over parameters in reverse order so cmd.params lists options
          # in the order they are defined in the FlowSpec subclass
          for arg in parameters[::-1]:
              kwargs = arg.option_kwargs(deploy_mode)
              cmd.params.insert(
                  0, click.Option(("--" + arg.name,), **kwargs)
              )
          return cmd
  
      return wrapper
  
imports: import json
  from typing import Any, Callable, Dict, NamedTuple, Optional, Type, Union
  from metaflow._vendor import click
  from .util import get_username, is_stringish
  from .exception import ParameterFieldFailed, ParameterFieldTypeMismatch, MetaflowException
label_desc: Use image node_id 3 for calling a global function with example usage: add_custom_parameters(deploy_mode) and returns: wrapper, cmd