class_docstr: `SBU Captioned Photo <http://www.cs.virginia.edu/~vicente/sbucaptions/>`_ Dataset.
  
  Args:
      root (string): Root directory of dataset where tarball
          ``SBUCaptionedPhotoDataset.tar.gz`` exists.
      transform (callable, optional): A function/transform that takes in a PIL image
          and returns a transformed version. E.g, ``transforms.RandomCrop``
      target_transform (callable, optional): A function/transform that takes in the
          target and transforms it.
      download (bool, optional): If True, downloads the dataset from the internet and
          puts it in root directory. If dataset is already downloaded, it is not
          downloaded again.
docstr: Download and extract the tarball, and download each individual photo.
code: def download(self) -> None:
      """Download and extract the tarball, and download each individual photo."""
  
      if self._check_integrity():
          print("Files already downloaded and verified")
          return
  
      download_and_extract_archive(
          self.url,
          self.root,
          self.root,
          self.filename,
          self.md5_checksum,
      )
  
      # Download individual photos
      with open(
          os.path.join(
              self.root,
              "dataset",
              "SBU_captioned_photo_dataset_urls.txt",
          )
      ) as fh:
          for line in fh:
              url = line.rstrip()
              try:
                  download_url(url, os.path.join(self.root, "dataset"))
              except OSError:
                  # The images point to public images on Flickr.
                  # Note: Images might be removed by users at anytime.
                  pass
  
file_path: vision/torchvision/datasets/sbu.py
imports: import os
  from typing import Any, Callable, Optional, Tuple
  from PIL import Image
  from .utils import check_integrity, download_and_extract_archive, download_url
  from .vision import VisionDataset
label_desc: Use image node_id 5 for calling the SBU obj's underlying member method code with example usage: obj.download() without return types