minor, but could be a dict-comp:

`group_map = {s: self.MetadataMap.getCategoryValue(s, category) for s in samples}`