def METHOD_NAME(self, key, msg):
    chain_key = self._get_chain_key_for_event(key, msg)
    if chain_key is not None:
        d = defer.Deferred()
        pending_call = self._pending_got_event_calls.get(chain_key)
        self._pending_got_event_calls[chain_key] = d
        # Wait for previously pending call, if any, to ensure
        # reports are sent out in the order events were queued.
        if pending_call is not None:
            yield pending_call
    try:
        reports = []
        for g in self.generators:
            if self._does_generator_want_key(g, key):
                report = yield g.generate(self.master, self, key, msg)
                if report is not None:
                    reports.append(report)
        if reports:
            yield self.sendMessage(reports)
    except Exception as e:
        log.err(e, 'Got exception when handling reporter events')
    if chain_key is not None:
        if self._pending_got_event_calls.get(chain_key) == d:
            del self._pending_got_event_calls[chain_key]
        d.callback(None)  # This event is now fully handled