Please re-read my comment. I understand what he did, but my points stand.
The name `SET` conveys little. Running the exercise in the same file is OK as it’s not in a module, but again - the work demonstrates algorithms well enough, but I can’t see this coding style as “smart” or “clean”. It’s not.
Defining a function and immediately calling it prevents pollution of module scope. Without it, `photo` would be exported.
The tests are in the same file because it makes the example self-contained, I assume.
The experiments are run 100,000 times because they have a random component and this exercises the system.