code: 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)
docs: Try to emit a report and possibly keep a copy of it