def compress_for_output_listing(paths):
will_remove = list(paths)<EOL>will_skip = set()<EOL>folders = set()<EOL>files = set()<EOL>for path in will_remove:<EOL><INDENT>if path.endswith("<STR_LIT>"):<EOL><INDENT>continue<EOL><DEDENT>if path.endswith("<STR_LIT>") or "<STR_LIT>" in path:<EOL><INDENT>folders.add(os.path.dirname(path))<EOL><DEDENT>files.add(path)<EOL><DEDENT>_normcased_files = set(map(os.path.normcase, files))<EOL>folders = compact(folders)<EOL>for folder in folders:<EOL><INDENT>for dirpath, _, dirfiles in os.walk(folder):<EOL><INDENT>for fname in dirfiles:<EOL><INDENT>if fname.endswith("<STR_LIT>"):<EOL><INDENT>continue<EOL><DEDENT>file_ = os.path.join(dirpath, fname)<EOL>if (os.path.isfile(file_) and<EOL>os.path.normcase(file_) not in _normcased_files):<EOL><INDENT>will_skip.add(file_)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>will_remove = files | {<EOL>os.path.join(folder, "<STR_LIT:*>") for folder in folders<EOL>}<EOL>return will_remove, will_skip<EOL>
Returns a tuple of 2 sets of which paths to display to user

    The first set contains paths that would be deleted. Files of a package
    are not added and the top-level directory of the package has a '*' added
    at the end - to signify that all it's contents are removed.

    The second set contains files that would have been skipped in the above
    folders.