code: def on_close(self, stats, previous_stats):
          
          reports = {
              'messages': self._messages,
              'stats': stats,
              'previous': previous_stats,
          }
          print(json.dumps(reports, cls=JSONSetEncoder, indent=4), file=self.out)
docs: Print the extended JSON report to reporter's output.
  
          :param dict stats: Metrics for the current pylint run
          :param dict previous_stats: Metrics for the previous pylint run