def dispatch(self, key, info, miss_h=None):
        code, d = self.pop(key)

        if not d:
            if miss_h:
                miss_h()
        else:
            try:
                evt_code = info.code
            except __HOLE__, e:
                d.errback(ProtocolContractError(e))
            else:
                if code is None or evt_code == code:
                    d.callback(info)
                else:
                    d.errback(UnexpectedStatusError(info))
dataset/ETHPy150Open arkadini/twimp/twimp/dispatch.py/StatusEventTracker.dispatch