def _handle_report(self, report):
        """Try to emit a report and possibly keep a copy of it"""

        keep_report = True

        if self.report_callback is not None:
            keep_report = self.report_callback(report, self.context)

        if keep_report:
            self.reports.append(report)
def _handle_report ( self , report ) : keep_report = True if self . report_callback is not None : keep_report = self . report_callback ( report , self . context ) if keep_report : self . reports . append ( report )
Try to emit a report and possibly keep a copy of it