def METHOD_NAME(frameworks):
    frameworks_by_service = defaultdict(list)
    for framework in frameworks:
        service = framework["service"]
        frameworks_by_service[service].append(framework)
    return {
        service: format_message_for_service(service, frameworks)
        for service, frameworks in frameworks_by_service.items()
    }