code: def _download(self) -> str:
      # Warn user if patterns are ignored
      if len(self.filenames) > 0:
          if self.include is not None and len(self.include) > 0:
              warnings.warn(
                  "Ignoring `--include` since filenames have being explicitly set."
              )
          if self.exclude is not None and len(self.exclude) > 0:
              warnings.warn(
                  "Ignoring `--exclude` since filenames have being explicitly set."
              )
  
      if not HF_HUB_ENABLE_HF_TRANSFER:
          logger.info(
              "Consider using `hf_transfer` for faster downloads. This solution comes with some limitations. See"
              " https://huggingface.co/docs/huggingface_hub/hf_transfer for more details."
          )
  
      # Single file to download: use `hf_hub_download`
      if len(self.filenames) == 1:
          return hf_hub_download(
              repo_id=self.repo_id,
              repo_type=self.repo_type,
              revision=self.revision,
              filename=self.filenames[0],
              cache_dir=self.cache_dir,
              resume_download=self.resume_download,
              force_download=self.force_download,
              token=self.token,
              local_dir=self.local_dir,
              local_dir_use_symlinks=self.local_dir_use_symlinks,
              library_name="huggingface-cli",
          )
  
      # Otherwise: use `snapshot_download` to ensure all files comes from same revision
      elif len(self.filenames) == 0:
          allow_patterns = self.include
          ignore_patterns = self.exclude
      else:
          allow_patterns = self.filenames
          ignore_patterns = None
  
      return snapshot_download(
          repo_id=self.repo_id,
          repo_type=self.repo_type,
          revision=self.revision,
          allow_patterns=allow_patterns,
          ignore_patterns=ignore_patterns,
          resume_download=self.resume_download,
          force_download=self.force_download,
          cache_dir=self.cache_dir,
          token=self.token,
          local_dir=self.local_dir,
          local_dir_use_symlinks=self.local_dir_use_symlinks,
          library_name="huggingface-cli",
      )
  
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 4 for calling the DownloadCommand obj's underlying member method code with example usage: obj._download() and returns: snapshot_download, hf_hub_download