code: def download_fiw_dataset(
      dataset_dir, split, scratch_dir=None, cleanup=False
  ):
      """Downloads and extracts the Families in the Wild dataset.
  
      Any existing files are not re-downloaded.
  
      Args:
          dataset_dir: the directory to output the final dataset
          split: the split being loaded
          scratch_dir (None): a scratch directory to use to store temporary files
          cleanup (True): whether to cleanup the scratch directory after
              extraction
      """
      etau.ensure_dir(dataset_dir)
  
      if scratch_dir is None:
          scratch_dir = os.path.join(dataset_dir, "scratch")
          etau.ensure_dir(scratch_dir)
  
      # Download dataset
      _download_images_if_necessary(dataset_dir, scratch_dir)
      _download_labels_if_necessary(dataset_dir, scratch_dir)
  
      if cleanup:
          logger.info("Cleaning up %s", scratch_dir)
          etau.delete_dir(scratch_dir)
  
      num_samples, classes = _get_dataset_info(dataset_dir, split)
  
      return num_samples, classes
  
imports: import logging
  import os
  from collections import defaultdict
  import eta.core.utils
  import eta.core.web
  import pandas
  import fiftyone
  import fiftyone.core.utils
  import fiftyone.utils.data
  from fiftyone.core.expressions import ViewField
  from fiftyone.core.expressions import VALUE
label_desc: Use image node_id 13 for calling a global function with example usage: download_fiw_dataset(dataset_dir, split, scratch_dir, cleanup) and returns: num_samples,  classes