@pimms.require<EOL><INDENT>def ensure_cache_directory(cache_directory, create_directories, create_mode):<DEDENT>
if os.path.isdir(cache_directory): return True<EOL>if not create_directories: raise ValueError('<STR_LIT>')<EOL>os.makedirs(os.path.abspath(cache_directory), create_mode)<EOL>return True<EOL>
ensure_cache_directory requires that a dataset's cache directory exists and raises an error
if it cannot be found.