<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_receipt(self, headers, body):
 """ If the receipt id can be found in the headers, then notify the waiting thread. :param dict headers: headers in the message :param body: the message content """

        if 'receipt-id' in headers and headers['receipt-id'] == self.receipt:
            with self.receipt_condition:
                self.received = True
                self.receipt_condition.notify()