Generalize `getS`