code: def check_fetch_lfw(
      data_home=None, funneled=True, download_if_missing=True
  ):
      """Helper function to download any missing LFW data"""
      data_home = get_data_home(data_home=data_home)
      lfw_home = join(data_home, "lfw_home")
  
      if funneled:
          archive_path = join(lfw_home, FUNNELED_ARCHIVE_NAME)
          data_folder_path = join(lfw_home, "lfw_funneled")
          archive_url = BASE_URL + FUNNELED_ARCHIVE_NAME
      else:
          archive_path = join(lfw_home, ARCHIVE_NAME)
          data_folder_path = join(lfw_home, "lfw")
          archive_url = BASE_URL + ARCHIVE_NAME
  
      if not exists(lfw_home):
          makedirs(lfw_home)
  
      for target_filename in TARGET_FILENAMES:
          target_filepath = join(lfw_home, target_filename)
          if not exists(target_filepath):
              if download_if_missing:
                  url = BASE_URL + target_filename
                  logger.warning("Downloading LFW metadata: %s", url)
                  urllib.urlretrieve(url, target_filepath)
              else:
                  raise IOError("%s is missing" % target_filepath)
  
      if not exists(data_folder_path):
          if not exists(archive_path):
              if download_if_missing:
                  archive_path_temp = archive_path + ".tmp"
                  logger.warning(
                      "Downloading LFW data (~200MB): %s", archive_url
                  )
                  urllib.urlretrieve(archive_url, archive_path_temp)
                  rename(archive_path_temp, archive_path)
              else:
                  raise IOError("%s is missing" % target_filepath)
  
          import tarfile
  
          logger.info(
              "Decompressing the data archive to %s", data_folder_path
          )
          tarfile.open(archive_path, "r:gz").extractall(path=lfw_home)
          remove(archive_path)
  
      return lfw_home, data_folder_path
  
file_path: catboost/contrib/python/scikit-learn/py2/sklearn/datasets/lfw.py
imports: from os import listdir, makedirs, remove, rename
  from os.path import join, exists, isdir
  from sklearn.utils import deprecated
  import logging
  import numpy
  from .base import get_data_home, Bunch
  from ..externals.joblib import Memory
  from ..externals.six import b
label_desc: Use image node_id 2 for calling a global function with example usage: check_fetch_lfw(data_home, funneled, download_if_missing) and returns: lfw_home,  data_folder_path