If you use `collections.defaultdict` you can get rid of this `if foo not in bar: initialize bar[foo]` pattern ;)