code: def exec_args(f):
      """decorator for adding block/targets args for execution
  
      applied to %pxconfig and %%px
      """
      args = [
          magic_arguments.argument(
              "-b",
              "--block",
              action="store_const",
              const=True,
              dest="block",
              help="use blocking (sync) execution",
          ),
          magic_arguments.argument(
              "-a",
              "--noblock",
              action="store_const",
              const=False,
              dest="block",
              help="use non-blocking (async) execution",
          ),
          magic_arguments.argument(
              "--stream",
              action="store_const",
              const=True,
              dest="stream",
              help="stream stdout/stderr in real-time (only valid when using blocking execution)",
          ),
          magic_arguments.argument(
              "--no-stream",
              action="store_const",
              const=False,
              dest="stream",
              help="do not stream stdout/stderr in real-time",
          ),
          magic_arguments.argument(
              "-t",
              "--targets",
              type=str,
              help="specify the targets on which to execute",
          ),
          magic_arguments.argument(
              "--local",
              action="store_const",
              const=True,
              dest="local",
              help="also execute the cell in the local namespace",
          ),
          magic_arguments.argument(
              "--verbose",
              action="store_const",
              const=True,
              dest="set_verbose",
              help="print a message at each execution",
          ),
          magic_arguments.argument(
              "--no-verbose",
              action="store_const",
              const=False,
              dest="set_verbose",
              help="don't print any messages",
          ),
          magic_arguments.argument(
              "--progress-after",
              dest="progress_after_seconds",
              type=float,
              default=None,
              help="""Wait this many seconds before showing a progress bar for task completion.
  
              Use -1 for no progress, 0 for always showing progress immediately.
              """,
          ),
          magic_arguments.argument(
              "--signal-on-interrupt",
              dest="signal_on_interrupt",
              type=str,
              default=None,
              help="""Send signal to engines on Keyboard Interrupt. By default a SIGINT is sent.
              Note that this is only applicable when running in blocking mode.
              Choices: SIGINT, 2, SIGKILL, 9, 0 (nop), etc.
              """,
          ),
      ]
      for a in args:
          f = a(f)
      return f
  
imports: import time
  from contextlib import contextmanager
  import inspect
  import re
  import sys
  from textwrap import dedent
  from IPython.core import magic_arguments
  from IPython.core.error import UsageError
  from IPython.core.magic import Magics, no_var_expand
  import ipyparallel
  from ..None import error
label_desc: Use image node_id 4 for calling a global function with example usage: exec_args(f) and returns: f