code: def get_dataset_dir():
      """Return folder where downloaded datasets and other data are stored.
      Default folder is ~/.surprise_data/, but it can also be set by the
      environment variable ``SURPRISE_DATA_FOLDER``.
      """
  
      folder = os.environ.get(
          "SURPRISE_DATA_FOLDER",
          os.path.expanduser("~") + "/.surprise_data/",
      )
      try:
          os.makedirs(folder)
      except OSError as e:
          if e.errno != errno.EEXIST:
              # reraise exception if folder does not exist and creation failed.
              raise
  
      return folder
  
file_path: Surprise/surprise/builtin_datasets.py
imports: import errno
  import os
  import zipfile
  from collections import namedtuple
  from os.path import join
  from urllib.request import urlretrieve
label_desc: Use image node_id 1 for calling a global function with example usage: get_dataset_dir() and returns: folder