<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def as_dict(self, ordered=False):
 """Returns the row as a dictionary, as ordered."""

        items = zip(self.keys(), self.values())

        return OrderedDict(items) if ordered else dict(items)