Moments in the Chebotarev density theorem: general class functions