'return `values` without reified group fields'

def _remove_reified_groups(self, values):

    (add, rem) = ([], [])
    values1 = {}
    for (key, val) in values.iteritems():
        if is_boolean_group(key):
            (add if val else rem).append(get_boolean_group(key))
        elif is_selection_groups(key):
            rem += get_selection_groups(key)
            if val:
                add.append(val)
        else:
            values1[key] = val
    if (('groups_id' not in values) and (add or rem)):
        values1['groups_id'] = (zip(repeat(3), rem) + zip(repeat(4), add))
    return values1
