def clear_cache(dataset_name=None):
dr = data_resources[dataset_name]<EOL>if '<STR_LIT>' in dr:<EOL><INDENT>for dirs, files in zip(dr['<STR_LIT>'], dr['<STR_LIT>']):<EOL><INDENT>for dir, file in zip(dirs, files):<EOL><INDENT>path = os.path.join(data_path, dataset_name, dir, file)<EOL>if os.path.exists(path):<EOL><INDENT>logging.info("<STR_LIT>" + path)<EOL>os.unlink(path)<EOL><DEDENT><DEDENT>for dir in dirs:<EOL><INDENT>path = os.path.join(data_path, dataset_name, dir)<EOL>if os.path.exists(path):<EOL><INDENT>logging.info("<STR_LIT>" + path)<EOL>os.rmdir(path)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>for file_list in dr['<STR_LIT>']:<EOL><INDENT>for file in file_list:<EOL><INDENT>path = os.path.join(data_path, dataset_name, file)<EOL>if os.path.exists(path):<EOL><INDENT>logging.info("<STR_LIT>" + path)<EOL>os.unlink(path)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>
Remove a data set from the cache