'Edit the visibility of an xblock on the unit page and
verify that the edit persists. Note that `groups`
are labels which should be clicked, but are not necessarily checked.'

def select_and_verify_unit_group_access(self, unit, partition_label, groups=[]):

    unit_access_editor = self.edit_unit_visibility(unit)
    unit_access_editor.select_groups_in_partition_scheme(partition_label, groups)
    if (not groups):
        partition_label = self.CHOOSE_ONE
    unit_access_editor = self.edit_unit_visibility(unit)
    self.verify_selected_partition_scheme(unit_access_editor, partition_label)
    self.verify_selected_groups(unit_access_editor, groups)
    unit_access_editor.save()
