def METHOD_NAME(
    self, input_units: UnitsContainer, group: Optional[str] = None
) -> frozenset[str]:
    ret = super().METHOD_NAME(input_units)
    if not group:
        return ret
    if group in self._groups:
        members = self._groups[group].members
    else:
        raise ValueError("Unknown Group with name '%s'" % group)
    return frozenset(ret & members)