<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rev(self, rev):
 """Return a new identity with the given revision"""

        d = self.dict
        d['revision'] = rev
        return self.from_dict(d)