On higher spin partition functions