Indeed the keys in a ```dict``` are unique, but ```dict.keys``` returns a list, which will fail on comparison to a ```set```, so I guess that's the reason for the creation of the ```set``` here