<s> from datetime import datetime <EOL> class csv_utils : <EOL> def coalesce_date ( date ) : <EOL> return "<STR_LIT>" if date is None else datetime . strftime ( date , '<STR_LIT>' ) <EOL> def coalesce_bool ( field ) : <EOL> return "<STR_LIT>" if field is None else "<STR_LIT:true>" if field is True else "<STR_LIT:false>" <EOL> def coalesce_int ( num ) : <EOL> return "<STR_LIT>" if num is None else str ( num ) </s>
