docs: def calculate_stats(self, data):
          """Calculate the stats data for our process level data.
  
          :param data: The collected stats data to report on
          :type data: dict
  
          """
          timestamp = data['timestamp']
          del data['timestamp']
  
          # Iterate through the last poll results
          stats = self.consumer_stats_counter()
          consumer_stats = dict()
          for name in data.keys():
              consumer_stats[name] = self.consumer_stats_counter()
              consumer_stats[name]['processes'] = self.process_count(name)
              for proc in data[name].keys():
                  for key in stats:
                      value = data[name][proc]['counts'].get(key, 0)
                      stats[key] += value
                      consumer_stats[name][key] += value
  
          # Return a data structure that can be used in reporting out the stats
          stats['processes'] = len(self.active_processes())
          return {
              'last_poll': timestamp,
              'consumers': consumer_stats,
              'process_data': data,
              'counts': stats
          }