I'm fairly sure this is broken on Python 3.

`items = sorted(categories_normalized.items())` should work.