@pimms.value<EOL><INDENT>def cache_directory(cache_root, name, custom_directory):<DEDENT>
if custom_directory is not None: return custom_directory<EOL>return os.path.join(cache_root, (name    if pimms.is_str(name) else<EOL>name[<NUM_LIT:0>] if len(name) == <NUM_LIT:1>     else<EOL>'<STR_LIT>' % (name[<NUM_LIT:0>], hash(name[<NUM_LIT:1>:]))))<EOL>
dataset.cache_directory is the directory in which the given dataset is cached.