def _parse_write_concern(options):
 concern = options.get('w')
 wtimeout = options.get('wtimeout')
 j = options.get('j', options.get('journal'))
 fsync = options.get('fsync')
 return WriteConcern(concern, wtimeout, j, fsync)

def _parse_write_concern ( options ) : concern = options . get ( 'w' ) wtimeout = options . get ( 'wtimeout' ) j = options . get ( 'j' , options . get ( 'journal' ) ) fsync = options . get ( 'fsync' ) return WriteConcern ( concern , wtimeout , j , fsync )
parse write concern options .