async def METHOD_NAME(self):
    ret = (
        await Book.annotate(upper_name=Upper("author__name"), count=Count("id"))
        .group_by("upper_name")
        .values("upper_name", "count")
    )
    self.assertListSortEqual(
        ret,
        [{"upper_name": "AUTHOR1", "count": 10}, {"upper_name": "AUTHOR2", "count": 5}],
        sorted_key="upper_name",
    )