def add_node_message_datapoints(self, node, queue_data, channel_data):
        """Add message stats for the node

        :param str node: The node name
        :param list queue_data: all of the queues
        :param list channel_data: all of the channels

        """
        base_name = 'Node/%s/Messages' % node

        # Top level message stats
        keys = self.DUMMY_STATS.keys()
        count, total, min_val, max_val, values = self.initialize_counters(keys)

        for channel in channel_data:
            if channel['node'].split('@')[-1] == node:
                for key in keys:
                    total[key] += channel.get(key, 0)

        # Per-Channel message Rates
        count, total, min_val, max_val, values = self.initialize_counters(keys)
        message_stats = list()
        for channel in channel_data:
            if channel['node'].split('@')[-1] == node:
                stats = channel.get('message_stats')
                if stats:
                    message_stats.append(stats)

        for stat_block in message_stats:
            for key in keys:
                total[key] += stat_block.get(key, 0)

        for key in keys:
            name = key
            if key == 'ack':
                name = 'Acknowledged'
            elif key == 'deliver':
                name = 'Delivered'
            elif key == 'deliver_get':
                name = 'Delivered (Total)'
            elif key == 'deliver_no_ack':
                name = 'Delivered No-Ack'
            elif key == 'get':
                name = 'Got'
            elif key == 'get_no_ack':
                name = 'Got No-Ack'
            elif key == 'publish':
                name = 'Published'
            elif key == 'redeliver':
                name = 'Redelivered'
            self.add_derive_value('%s/%s' % (base_name, name),
                                  'messages',
                                  total[key])

        keys = ['messages_ready', 'messages_unacknowledged']
        count, total, min_val, max_val, values = self.initialize_counters(keys)
        for queue in queue_data:
            if queue['node'].split('@')[-1] == node:
                for key in keys:
                    total[key] += queue.get(key, 0)

        self.add_gauge_value(base_name % '%s Available', 'messages',
                             total['messages_ready'])
        self.add_gauge_value('%s Unacknowledged' % base_name,
                             'messages',
                             total['messages_unacknowledged'])
dataset/ETHPy150Open MeetMe/newrelic-plugin-agent/newrelic_plugin_agent/plugins/rabbitmq.py/RabbitMQ.add_node_message_datapoints/swapped operands of `%`