Really minor, but the calls to `.keys` aren't necessary (just like when iterating the keys of the dictionary: `for key in dict` instead of `for key in dict.items()`, which also builds an intermediate list in py2).