@staticmethod<EOL><INDENT>def download(path, create_directories=True, mode=<NUM_LIT>, overwrite=False):<DEDENT>
dataset_urls = BensonWinawer2018Dataset.dataset_urls<EOL>if not os.path.isdir(path):<EOL><INDENT>if not create_directories: raise ValueError('<STR_LIT>')<EOL>elif not os.path.isdir(path): os.makedirs(os.path.abspath(path), mode)<EOL><DEDENT>if not overwrite:<EOL><INDENT>if all(os.path.isdir(os.path.join(path, x)) for x in six.iterkeys(dataset_urls)):<EOL><INDENT>return path<EOL><DEDENT>elif any(os.path.isdir(os.path.join(path, x)) for x in six.iterkeys(dataset_urls)):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT><DEDENT>logging.info('<STR_LIT>')<EOL>for (dirname, durl) in six.iteritems(dataset_urls):<EOL><INDENT>tgz_file = os.path.join(path, dirname + '<STR_LIT>')<EOL>logging.info('<STR_LIT>', tgz_file)<EOL>if six.PY2:<EOL><INDENT>response = urllib.request.urlopen(durl)<EOL>with open(tgz_file, '<STR_LIT:wb>') as fl:<EOL><INDENT>shutil.copyfileobj(response, fl)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>with urllib.request.urlopen(durl) as response:<EOL><INDENT>with open(tgz_file, '<STR_LIT:wb>') as fl:<EOL><INDENT>shutil.copyfileobj(response, fl)<EOL><DEDENT><DEDENT><DEDENT>if not tarfile.is_tarfile(tgz_file):<EOL><INDENT>raise ValueError('<STR_LIT>' % tgz_file)<EOL><DEDENT>logging.info('<STR_LIT>', tgz_file)<EOL>with tarfile.open(tgz_file, '<STR_LIT>') as tar:<EOL><INDENT>tar.extractall(path)<EOL>tar.close()<EOL><DEDENT>os.remove(tgz_file)<EOL><DEDENT>return path<EOL>
BensonWinawer2018Dataset.download(path) downloads the Benson and Winawer (2018) dataset into
  the directory given by path. If the dataset is already found there, then it will not be
  overwritten.

The following optional parameters may be provided:
  * create_directories (default: True) may be set to False to indicate that the path should
    not be created if it does not already exist.
  * mode (default: 0o755) specifies the permissions that should be used if the directory is
    created.
  * overwrite (default: False) may be set to True to indicate that the dataset should be
    overwritten if it is already found.