<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def flatten_dict(self, obj):
 """Return an OrderedDict dict preserving order of keys in fieldnames """

        return OrderedDict(zip(self.fieldnames, self.flatten(obj)))