def METHOD_NAME(
    main_data: PackageMessages, pr_data: PackageMessages
) -> tuple[PackageMessages, PackageMessages]:
    missing_messages_data: PackageMessages = {}
    for package, data in main_data.items():
        package_missing_messages: list[OldJsonExport] = []
        for message in data["messages"]:
            try:
                pr_data[package]["messages"].remove(message)
            except ValueError:
                package_missing_messages.append(message)
        missing_messages_data[package] = PackageData(
            commit=pr_data[package]["commit"], messages=package_missing_messages
        )
    return missing_messages_data, pr_data