Sort nested Python dicts