def on_aggregated_data(self, data, stats):
        """
        @data: aggregated data
        @stats: stats about gun
        """
        self.data_and_stats_stream.write(
            '%s\n' % json.dumps({
                'data': data,
                'stats': stats
            }))
def on_aggregated_data ( self , data , stats ) : self . data_and_stats_stream . write ( '%s\n' % json . dumps ( { 'data' : data , 'stats' : stats } ) )
@data: aggregated data
        @stats: stats about gun