code: def download_data(
      dataset_names: Optional[List[str]] = None,
      data_root: str = DEFAULT_DATA_ROOT,
      url_root: str = DEFAULT_URL_ROOT,
  ) -> None:
      """
      Downloads the relevant dataset files.
  
      Args:
          dataset_names: A list of the names of datasets to download. If `None`,
              downloads all available datasets.
      """
  
      if dataset_names is None:
          dataset_names = ALL_DATASETS
  
      os.makedirs(data_root, exist_ok=True)
  
      for dataset_name in dataset_names:
          cameras_file = dataset_name + ".pth"
          images_file = cameras_file.replace(".pth", ".png")
          license_file = cameras_file.replace(".pth", "_license.txt")
  
          for fl in (cameras_file, images_file, license_file):
              local_fl = os.path.join(data_root, fl)
              remote_fl = os.path.join(url_root, fl)
  
              print(
                  f"Downloading dataset {dataset_name} from {remote_fl} to {local_fl}."
              )
  
              r = requests.get(remote_fl)
              with open(local_fl, "wb") as f:
                  f.write(r.content)
  
file_path: pytorch3d/projects/nerf/nerf/dataset.py
imports: import os
  from typing import List, Optional, Tuple
  import numpy
  import requests
  import torch
  from PIL import Image
  from pytorch3d.renderer import PerspectiveCameras
  from torch.utils.data import Dataset
label_desc: Use image node_id 3 for calling a global function with example usage: download_data(dataset_names, data_root, url_root) without return types