def convert(value, row):
    missing = crosswalk['final'].missing or 9
    unknown = crosswalk['final'].unknown or None
    convert_key = get_state_key(row['rapstatex'])
    
    if not convert_key:
        return missing
    
    try:
        return crosswalk['final'].convert(convert_key)
     
    except ConvertError:
        log.write('asource', [row['id'], convert_key, "State not recognized"])
        
        return unknown
