def METHOD_NAME(self, qs):
    qs = qs.annotate_comment_count()
    if hasattr(qs, "annotate_positive_rating_count"):
        qs = qs.annotate_positive_rating_count().annotate_negative_rating_count()
    return qs