def _collate_message_types(summaries):
    """collate different error message types"""
    message_type_count = {}
    for summary in summaries:
        for message in summary.get('summary').get('validationSummary').get('messageTypes'):
            message_type_count[message.get('messageType')] = message_type_count.setdefault(message.get('messageType'), 0) + int(message.get('total'))

    ret = []
    for message_type, total in message_type_count.items():
        ret.append({
            'messageType': message_type,
            'total': total
        })
    return ret