#NEWLINE# def _generate_county_filename( self , start_date , result ) : #NEWLINE# #INDENT# bits = [ start_date . replace ( '-' , '' ) , self . state ] #NEWLINE# if result [ 'party' ] : #NEWLINE# #INDENT# bits . append ( result [ 'party' ] . lower ( ) ) #NEWLINE# #UNINDENT# bits . extend ( [ result [ 'race_type' ] . lower ( ) , result [ 'county' ] . replace ( ' ' , '_' ) . lower ( ) ] ) #NEWLINE# bits . append ( 'precinct' ) #NEWLINE# filename = ( '__' . join ( bits ) + '.csv' ) #NEWLINE# return filename