def _got_response(self, msg):
<EOL>resp_id = msg.get('<STR_LIT:id>', None)<EOL>if resp_id is None:<EOL><INDENT>method = msg.get('<STR_LIT>', None)<EOL>if not method:<EOL><INDENT>logger.error("<STR_LIT>", msg)<EOL>return<EOL><DEDENT>result = msg.get('<STR_LIT>', None)<EOL>logger.debug("<STR_LIT>" % method)<EOL>subs = self.subscriptions.get(method)<EOL>for q in subs:<EOL><INDENT>self.loop.create_task(q.put(result))<EOL><DEDENT>return<EOL><DEDENT>assert '<STR_LIT>' not in msg<EOL>result = msg.get('<STR_LIT:result>')<EOL>inf = self.inflight.pop(resp_id) <EOL>if not inf:<EOL><INDENT>logger.error("<STR_LIT>" % resp_id)<EOL>return<EOL><DEDENT>req, rv = inf<EOL>if '<STR_LIT:error>' in msg:<EOL><INDENT>err = msg['<STR_LIT:error>']<EOL>logger.info("<STR_LIT>" % err)<EOL>rv.set_exception(ElectrumErrorResponse(err, req))<EOL><DEDENT>else:<EOL><INDENT>rv.set_result(result)<EOL><DEDENT>
Decode and dispatch responses from the server.

Has already been unframed and deserialized into an object.