import copy


def mutate_dropped(record, rule):
    """Mutate a record for a "DROPPED" action.
    """
    if rule['filters'](record):
        r = copy.copy(record)
        c = []
        if 'column_filters' not in rule:
            return None
        for column in r['columns']:
            c_filters = rule.get('column_filters', lambda c: False)
            if not c_filters(column):
                c.append(column)
            r['columns'] = c
        return r
    return record