<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cancel(self, refund=True):
 """Cancel this order, optionally refunding it """

        if refund:
            self.refund()
        self.status = self.CANCELLED
        self.save()