code: def download_lfw_dataset(dataset_dir, scratch_dir=None, cleanup=True):
      """Downloads and extracts the Labeled Faces in the Wild dataset.
  
      Any existing files are not re-downloaded.
  
      Args:
          dataset_dir: the directory to output the final dataset
          scratch_dir (None): a scratch directory to use to store temporary files
          cleanup (True): whether to cleanup the scratch directory after
              extraction
      """
      if scratch_dir is None:
          scratch_dir = os.path.join(dataset_dir, "scratch")
  
      # Download dataset
      images_dir = _download_videos(scratch_dir)
      test_path, train_path = _download_splits(scratch_dir)
  
      # Reorganize files into splits
      logger.info("Reorganizing images into splits...")
  
      # Test split
      logger.info("Creating test split...")
      test_folders = _load_split_info(test_path)
      with fou.ProgressBar() as pb:
          for test_folder in pb(test_folders):
              indir = os.path.join(images_dir, test_folder)
              outdir = os.path.join(dataset_dir, "test", test_folder)
              etau.move_dir(indir, outdir)
  
      # Train split
      logger.info("Creating train split...")
      train_folders = _load_split_info(train_path)
      with fou.ProgressBar() as pb:
          for train_folder in pb(train_folders):
              indir = os.path.join(images_dir, train_folder)
              outdir = os.path.join(dataset_dir, "train", train_folder)
              etau.move_dir(indir, outdir)
  
      if cleanup:
          etau.delete_dir(scratch_dir)
  
file_path: fiftyone/fiftyone/utils/lfw.py
imports: import logging
  import os
  import eta.core.utils
  import eta.core.web
  import fiftyone.core.utils
label_desc: Use image node_id 1 for calling a global function with example usage: download_lfw_dataset(dataset_dir, scratch_dir, cleanup) without return types