code: def help_func(parser: ArgumentParser) -> Callable:
      """
      Return a function that prints help for the given parser. Using this doesn't
      exit during the call to to `parse_args` itself, which would be ideal, but
      only when the function from the `parse_args` result is called. It looks
      about the same as long as you do the second right after the first, at
      least.
      """
  
      def inner_func(args: Namespace) -> Any:
          parser.print_help()
  
      return inner_func
  
imports: import functools
  import itertools
  from argparse import SUPPRESS, ArgumentDefaultsHelpFormatter, ArgumentParser, Namespace
  from typing import Any, Callable, List, NamedTuple, Optional, Tuple, Union, cast
  from termcolor import colored
  from determined.common import util
label_desc: Use image node_id 5 for calling a global function with example usage: help_func(parser) and returns: inner_func