def convert(value, row):
    if not row['rapstatex']:
        return 9
    
    try:
        return int(crosswalk['default'].convert(row['rapstatex'].lower()))    
    except ConvertError:
        log.write('ssource', [row['id'], row['rapstatex'], row['rapstatex'], "state not recognized"])
            
        return 9
