code: def register_subcommand(parser: _SubParsersAction):
      download_parser = parser.add_parser(
          "download", help="Download files from the Hub"
      )
      download_parser.add_argument(
          "repo_id",
          type=str,
          help="ID of the repo to download from (e.g. `username/repo-name`).",
      )
      download_parser.add_argument(
          "filenames",
          type=str,
          nargs="*",
          help="Files to download (e.g. `config.json`, `data/metadata.jsonl`).",
      )
      download_parser.add_argument(
          "--repo-type",
          choices=["model", "dataset", "space"],
          default="model",
          help="Type of repo to download from (e.g. `dataset`).",
      )
      download_parser.add_argument(
          "--revision",
          type=str,
          help="An optional Git revision id which can be a branch name, a tag, or a commit hash.",
      )
      download_parser.add_argument(
          "--include",
          nargs="*",
          type=str,
          help="Glob patterns to match files to download.",
      )
      download_parser.add_argument(
          "--exclude",
          nargs="*",
          type=str,
          help="Glob patterns to exclude from files to download.",
      )
      download_parser.add_argument(
          "--cache-dir",
          type=str,
          help="Path to the directory where to save the downloaded files.",
      )
      download_parser.add_argument(
          "--local-dir",
          type=str,
          help=(
              "If set, the downloaded file will be placed under this directory either as a symlink (default) or a"
              " regular file. Check out"
              " https://huggingface.co/docs/huggingface_hub/guides/download#download-files-to-local-folder for more"
              " details."
          ),
      )
      download_parser.add_argument(
          "--local-dir-use-symlinks",
          choices=["auto", "True", "False"],
          default="auto",
          help=(
              "To be used with `local_dir`. If set to 'auto', the cache directory will be used and the file will be"
              " either duplicated or symlinked to the local directory depending on its size. It set to `True`, a"
              " symlink will be created, no matter the file size. If set to `False`, the file will either be"
              " duplicated from cache (if already exists) or downloaded from the Hub and not cached."
          ),
      )
      download_parser.add_argument(
          "--force-download",
          action="store_true",
          help="If True, the files will be downloaded even if they are already cached.",
      )
      download_parser.add_argument(
          "--resume-download",
          action="store_true",
          help="If True, resume a previously interrupted download.",
      )
      download_parser.add_argument(
          "--token",
          type=str,
          help="A User Access Token generated from https://huggingface.co/settings/tokens",
      )
      download_parser.add_argument(
          "--quiet",
          action="store_true",
          help="If True, progress bars are disabled and only the path to the download files is printed.",
      )
      download_parser.set_defaults(func=DownloadCommand)
  
file_path: hub-client/src/huggingface_hub/commands/download.py
imports: import warnings
  from argparse import Namespace, _SubParsersAction
  from typing import List, Literal, Optional, Union
  from huggingface_hub import logging
  from huggingface_hub._snapshot_download import snapshot_download
  from huggingface_hub.commands import BaseHuggingfaceCLICommand
  from huggingface_hub.constants import HF_HUB_ENABLE_HF_TRANSFER
  from huggingface_hub.file_download import hf_hub_download
  from huggingface_hub.utils import disable_progress_bars, enable_progress_bars
label_desc: Use image node_id 1 for calling the DownloadCommand obj's underlying member method code with example usage: obj.register_subcommand(parser) without return types