[python] Converting dict to OrderedDict