code: def register_command(command):
      @main.command(
          command.__name__,
          context_settings={
              "help_option_names": [],
              "ignore_unknown_options": True,
          },
      )
      @click.argument("cli_args", nargs=-1, type=click.UNPROCESSED)
      @functools.wraps(command)
      def wrapper(cli_args):
          with patch("sys.argv", [command.__name__] + list(cli_args)):
              command()
  
imports: import functools
  import importlib
  from unittest.mock import patch
  import click
label_desc: Use image node_id 2 for calling a global function with example usage: register_command(command) without return types