'Apply a set of pre-defined filters on a known set of events and return
the filtered list of event numbers.
The pre-defined events are four events with a C{count} attribute set to
C{0}, C{1}, C{2}, and C{3}.
@param filters: names of the filters to apply.
Options are:
- C{"twoMinus"} (count <=2),
- C{"twoPlus"} (count >= 2),
- C{"notTwo"} (count != 2),
- C{"no"} (False).
@type filters: iterable of str
@param other: Whether to return a list of filtered events as well.
@type other: L{bool}
@return: event numbers or 2-tuple of lists of event numbers.
@rtype: L{list} of L{int} or 2-L{tuple} of L{list} of L{int}'

def filterWith(self, filters, other=False):

    events = [dict(count=0), dict(count=1), dict(count=2), dict(count=3)]
    class Filters(object, ):
        @staticmethod
        def twoMinus(event):
            '\n                                                                count    <=    2\n\n                                                                @param    event:    an    event\n                                                                @type    event:    dict\n\n                                                                @return:    L{PredicateResult.yes}    if    C{event["count"]    <=    2},\n                                                                                otherwise    L{PredicateResult.maybe}.\n                                                                '
            if (event['count'] <= 2):
                return PredicateResult.yes
            return PredicateResult.maybe
        @staticmethod
        def twoPlus(event):
            '\n                                                                count    >=    2\n\n                                                                @param    event:    an    event\n                                                                @type    event:    dict\n\n                                                                @return:    L{PredicateResult.yes}    if    C{event["count"]    >=    2},\n                                                                                otherwise    L{PredicateResult.maybe}.\n                                                                '
            if (event['count'] >= 2):
                return PredicateResult.yes
            return PredicateResult.maybe
        @staticmethod
        def notTwo(event):
            '\n                                                                count    !=    2\n\n                                                                @param    event:    an    event\n                                                                @type    event:    dict\n\n                                                                @return:    L{PredicateResult.yes}    if    C{event["count"]    !=    2},\n                                                                                otherwise    L{PredicateResult.maybe}.\n                                                                '
            if (event['count'] == 2):
                return PredicateResult.no
            return PredicateResult.maybe
        @staticmethod
        def no(event):
            '\n                                                                No    way,    man.\n\n                                                                @param    event:    an    event\n                                                                @type    event:    dict\n\n                                                                @return:    L{PredicateResult.no}\n                                                                '
            return PredicateResult.no
        @staticmethod
        def bogus(event):
            '\n                                                                Bogus    result.\n\n                                                                @param    event:    an    event\n                                                                @type    event:    dict\n\n                                                                @return:    something    other    than    a    valid    predicate    result.\n                                                                '
            return None
    predicates = (getattr(Filters, f) for f in filters)
    eventsSeen = []
    eventsNotSeen = []
    trackingObserver = eventsSeen.append
    if other:
        extra = [eventsNotSeen.append]
    else:
        extra = []
    filteringObserver = FilteringLogObserver(trackingObserver, predicates, *extra)
    for e in events:
        filteringObserver(e)
    if extra:
        return ([e['count'] for e in eventsSeen], [e['count'] for e in eventsNotSeen])
    return [e['count'] for e in eventsSeen]
