<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def methodReturnReceived(self, mret):
 """ Called when a method return message is received """

        d, timeout = self._pendingCalls.get(mret.reply_serial, (None, None))
        if timeout:
            timeout.cancel()
        if d:
            del self._pendingCalls[mret.reply_serial]
            d.callback(mret)