Adding sample IDs of those with non-ref GT as row variable

I would like to add a row variable that contains sample ID(s) of hets or homozygous for the alt allele. Tried a few things but no success. Would greatly appreciate any ideas on how to gather this data

something like this:

mt = mt.annotate_rows(
  het_ids = hl.agg.filter(mt.GT.is_het(), hl.agg.collect(mt.s)),
  homvar_ids = hl.agg.filter(mt.GT.is_hom_var(), hl.agg.collect(mt.s)))

this worked! thanks so much for the speedy reply. Much appreciated