def cleanup(files):
for cur_file in files:<EOL><INDENT>if os.path.isdir(cur_file):<EOL><INDENT>shutil.rmtree(cur_file)<EOL><DEDENT>else:<EOL><INDENT>shutil.rmtree(os.path.dirname(cur_file))<EOL><DEDENT><DEDENT>
:param files:
:return: