def convert(value,row):
    '''Rule to remove duplicate rows from MA.'''
    if key_as_str(row['rapstatex']) == 'ma':
        _row = []
        for i, r in enumerate(row):
            if i ==0:
                continue
            _row.append(r)
        
        ma_duplicate[str(_row)] += 1
        if ma_duplicate[str(_row)] % 2 == 0:
            row.delete()
    
    return value