@pimms.value<EOL><INDENT>def cache_root(custom_directory):<DEDENT>
if custom_directory is not None: return None<EOL>elif config['<STR_LIT>'] is None:<EOL><INDENT>path = tempfile.mkdtemp(prefix='<STR_LIT>')<EOL>if not os.path.isdir(path): raise ValueError('<STR_LIT>')<EOL>config['<STR_LIT>'] = path<EOL>atexit.register(shutil.rmtree, path)<EOL><DEDENT>return config['<STR_LIT>']<EOL>
dataset.cache_root is the root directory in which the given dataset has been cached.