docs: def _got_response(self, msg):
          '''
              Decode and dispatch responses from the server.
  
              Has already been unframed and deserialized into an object.
          '''
  
          #logger.debug("MSG: %r" % msg)
  
          resp_id = msg.get('id', None)
  
          if resp_id is None:
              # subscription traffic comes with method set, but no req id.
              method = msg.get('method', None)
              if not method:
                  logger.error("Incoming server message had no ID nor method in it", msg)
                  return
  
              # not obvious, but result is on params, not result, for subscriptions
              result = msg.get('params', None)
  
              logger.debug("Traffic on subscription: %s" % method)
  
              subs = self.subscriptions.get(method)
              for q in subs:
                  self.loop.create_task(q.put(result))
  
              return
  
          assert 'method' not in msg
          result = msg.get('result')
  
          # fetch and forget about the request
          inf = self.inflight.pop(resp_id) 
          if not inf:
              logger.error("Incoming server message had unknown ID in it: %s" % resp_id)
              return
  
          # it's a future which is done now
          req, rv = inf
  
          if 'error' in msg:
              err = msg['error']
              
              logger.info("Error response: '%s'" % err)
              rv.set_exception(ElectrumErrorResponse(err, req))
  
          else:
              rv.set_result(result)