def devilry_comment_summary(group):
    """
    Renders a comment summary for the given AssignmentGroup.

    Assumes that the AssignmentGroup has been annotated with:

    - :meth:`~devilry.apps.core.models.AssignmentGroupQuerySet.annotate_with_number_of_private_groupcomments_from_user`.
    - :meth:`~devilry.apps.core.models.AssignmentGroupQuerySet.annotate_with_number_of_private_imageannotationcomments_from_user`.

    Args:
        group: An :class:`devilry.apps.core.models.AssignmentGroup` object annotated
            as explained above.
    """
    return {
        'group': group
    }