add keys in dictionary in sorted order,sorted_dict = collections.OrderedDict(sorted(d.items()))