Duplicate File Finder Script

The following cross-platform Python script lets you find duplicate files within a directory tree. Files are considered duplicates when they have the same name and content. First, the script walks through the directory tree by using the os.walk()
standard function and stores the MD5 digest of every file found in the process. The threading
module is used to spawn multiple workers (as much as available cores) in order to speed up this process. Second, file names and MD5 digests are compared to find duplicate files and write the results into duplicate_files.txt
.
The code is simple, type-annotated (checked against mypy) and much commented so it can be easily customized. Python 3.9 or greater is required.