code: def hide_subparsers_from_help(subparsers):
      # metavar needs to be explicitly set in order to hide subcommands
      # from the 'positional arguments' choices list
      # see: https://bugs.python.org/issue22848
      # Need to set `add_help=False`, but avoid setting `help`
      # (not even to `argparse.SUPPPRESS`).
      # NOTE: The argument is the parent subparser, not the subcommand parser.
      cmds = [
          cmd
          for cmd, parser in subparsers.choices.items()
          if parser.add_help
      ]
      subparsers.metavar = "{{{}}}".format(",".join(cmds))
  
imports: import argparse
label_desc: Use image node_id 2 for calling a global function with example usage: hide_subparsers_from_help(subparsers) without return types