<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def filter(self, result):
 """ Filter the specified result based on query criteria. @param result: A potential result. @type result: L{sxbase.SchemaObject} @return: True if result should be excluded. @rtype: boolean """

        if result is None:
            return True
        reject = result in self.history
        if reject:
            log.debug('result %s, rejected by\n%s', Repr(result), self)
        return reject