iterate over a dictionary `dict` in sorted order,return iter(sorted(dict.items()))