def _handle_event_socket_recv(self, raw):
        '''
        Callback for events on the event sub socket
        '''
        mtag, data = self.event.unpack(raw, self.event.serial)
        # see if we have any futures that need this info:
        for tag_prefix, futures in six.iteritems(self.tag_map):
            if mtag.startswith(tag_prefix):
                for future in futures:
                    if future.done():
                        continue
                    future.set_result({'data': data, 'tag': mtag})
                    self.tag_map[tag_prefix].remove(future)
                    if self.timeout_map in future:
                        tornado.ioloop.IOLoop.current().remove_timeout(self.timeout_map[future])
                        del self.timeout_map[future]


# TODO: move to a utils function within salt-- the batching stuff is a bit tied together
dataset/ETHPy150Open saltstack/salt/salt/netapi/rest_tornado/saltnado.py/EventListener._handle_event_socket_recv/swapped operands of `in`