code: def group_by(self, key, field=lambda x: x.xfer):
          
          return Transactions([t for t in self.trans if field(t) == key])
docs: Returns all transactions whose given ``field`` matches ``key``.
  
          Returns:
              A ``Transactions`` object.