def METHOD_NAME(complaints):
    """Build formatted Slack message for posting to the API.
    Complaints are aggregated by source to reduce the number of blocks.
    """
    blocks = [get_maintainers_block(complaints)]
    def message_for_source(complaint):
        return "{main_text} - (last update: {last_updated})".format(
            main_text=complaint.message,
            last_updated=complaint.last_updated.strftime("%Y-%m-%d"))
    for source, complaints_by_source in groupby(
            complaints, key=lambda x: x.data_source):
        for message, complaint_list in groupby(
                complaints_by_source, key=message_for_source):
            signal_and_geo_types = ""
            for complaint in complaint_list:
                signal_and_geo_types += "`{signal}: [{geo_types}]`\n".format(
                    signal=complaint.signal,
                    geo_types=", ".join(complaint.geo_types))
            LOGGER.critical(event="Signal out of SLA",
                            message=message,
                            data_source=source,
                            signal_and_geo_types=signal_and_geo_types)
            blocks.extend([
                {
                    "type": "divider"
                },
                {
                    "type": "section",
                    "text": {
                        "type": "mrkdwn",
                        "text": "*{source_name}* {message}:\n{signals}"
                        .format(
                            source_name=source.upper(),
                            message=message,
                            signals=signal_and_geo_types)
                    }
                }
            ])
    return blocks