code: def prepare_parser(program):
      
      parser = ArgumentParser(
          description=PROG_DESCRIPTION, prog=program,
          formatter_class=HelpFormatter,
          add_help=False)
      parser.add_argument(
          "-h", "--help", action=MinimalHelpAction, help=argparse.SUPPRESS)
  
      # Register sub-commands.
      submodules = (
          "nodes", "machines", "devices", "controllers",
          "fabrics", "vlans", "subnets", "spaces",
          "files", "tags", "users",
          "profiles", "shell",
      )
      cmd_help.register(parser)
      for submodule in submodules:
          module = import_module("." + submodule, __name__)
          module.register(parser)
  
      # Register global options.
      parser.add_argument(
          '--debug', action='store_true', default=False,
          help=argparse.SUPPRESS)
  
      return parser
docs: Create and populate an argument parser.