<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def group_by(self, key, field=lambda x: x.xfer):
 """Returns all transactions whose given ``field`` matches ``key``. Returns: A ``Transactions`` object. """

        return Transactions([t for t in self.trans if field(t) == key])