def notTwo(event):
                """
                count != 2

                @param event: an event
                @type event: dict

                @return: L{PredicateResult.yes} if C{event["count"] != 2},
                    otherwise L{PredicateResult.maybe}.
                """
                if event["count"] == 2:
                    return PredicateResult.no
                return PredicateResult.maybe

                count != 2

                @param event: an event
                @type event: dict

                @return: L{PredicateResult.yes} if C{event["count"] != 2},
                    otherwise L{PredicateResult.maybe}.
                
stackoverflow/venv/lib/python3.6/site-packages/twisted/logger/test/test_filter.py