def METHOD_NAME(self):
    if self.groups is None:
        return
    checked: Set[str] = set()
    for i, g in enumerate(self.groups):
        if g in checked:
            raise ValueError(f"duplicate logging group '{g}' on index {i}")
        checked.add(g)