def set_groups(self, state):
    for group in self.get_groups():
        self.set_group(group, state)
def set_groups(self, state):
    for group in self.get_groups():
        self.set_group(group, state)