def METHOD_NAME(task_function: TaskFunction) -> Callable[[], None]:
    @functools.wraps(task_function)
    def wrapper(cfg_passthrough: Optional[DictConfig] = None) -> Any:
        # Check it config was passed.
        if cfg_passthrough is not None:
            return task_function(cfg_passthrough)
        else:
            args = get_args_parser()
            # Parse arguments in order to retrieve overrides
            parsed_args = args.parse_args()  # type: argparse.Namespace
            # Get overriding args in dot string format
            overrides = parsed_args.overrides  # type: list
            # Disable the creation of .hydra subdir
            # https://hydra.cc/docs/tutorials/basic/running_your_app/working_directory
            overrides.append("hydra.output_subdir=null")
            # Hydra logging outputs only to stdout (no log file).
            # https://hydra.cc/docs/configure_hydra/logging
            overrides.append("hydra/job_logging=stdout")
            # Set run.dir ONLY for ExpManager "compatibility" - to be removed.
            overrides.append("hydra.run.dir=.")
            # Check if user set the schema.
            if schema is not None:
                # Create config store.
                cs = ConfigStore.instance()
                # Get the correct ConfigStore "path name" to "inject" the schema.
                if parsed_args.config_name is not None:
                    path, name = os.path.split(parsed_args.config_name)
                    # Make sure the path is not set - as this will disable validation scheme.
                    if path != '':
                        sys.stderr.write(
                            f"ERROR Cannot set config file path using `--config-name` when "
                            "using schema. Please set path using `--config-path` and file name using "
                            "`--config-name` separately.\n"
                        )
                        sys.exit(1)
                else:
                    name = config_name
                # Register the configuration as a node under the name in the group.
                cs.store(name=name, node=schema)  # group=group,
            # Wrap a callable object with name `parse_args`
            # This is to mimic the ArgParser.parse_args() API.
            def parse_args(self, args=None, namespace=None):
                return parsed_args
            parsed_args.parse_args = parse_args
            # no return value from run_hydra() as it may sometime actually run the task_function
            # multiple times (--multirun)
            # argparse_wrapper = _argparse_wrapper(args)
            argparse_wrapper = parsed_args
            _run_hydra(
                args=argparse_wrapper,
                args_parser=args,
                task_function=task_function,
                config_path=config_path,
                config_name=config_name,
            )
    return wrapper