code: def register(cls, subparsers):
      parser_kwargs = {}
      if cls.DESCRIPTION:
          parser_kwargs["help"] = cls.DESCRIPTION
      parser: argparse.ArgumentParser = subparsers.add_parser(
          cls.NAME,
          add_help=False,
          formatter_class=RichHelpFormatter,
          **parser_kwargs,
      )
      command = cls(parser)
      if cls.DEFAULT_HELP:
          parser.add_argument(
              "-h",
              "--help",
              help="Show this help message and exit",
              action="help",
              default=argparse.SUPPRESS,
          )
      command._register()
      parser.set_defaults(func=command._command)
  
file_path: dstack/src/dstack/_internal/cli/commands/__init__.py
imports: import argparse
  import os
  from abc import ABC, abstractmethod
  from pathlib import Path
  from rich_argparse import RichHelpFormatter
  import dstack._internal.core.services.api_client
  from dstack._internal.cli.utils.common import configure_logging
  from dstack._internal.core.errors import CLIError, ConfigurationError
  from dstack.api import Client
  from dstack.api.server import APIClient
label_desc: Use image node_id 2 for calling the BaseCommand obj's underlying member method code with example usage: obj.register(cls, subparsers) without return types