<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sendResponse(self, id, result, error):
 """sends a response to the peer"""

        self.sendMessage({"result":result, "error": error, "id":id})