the current version is big (~100 lines), why not break it up into a `_squash_nested_dict` and `_squash_versop`?