#NEWLINE# def report_for( queryset , ranges ) : #NEWLINE# #INDENT# for ( i , cohort_range ) in enumerate ( ranges ) : #NEWLINE# #INDENT# cohort_users = get_cohort ( return_range , cohort_range ) #NEWLINE# ( start , end ) = cohort_range #NEWLINE# data = [ ] #NEWLINE# data . append ( start . strftime ( '%b %Y' ) ) #NEWLINE# for _ in range ( i ) : #NEWLINE# #INDENT# data . append ( None ) #NEWLINE# #UNINDENT# data . append ( len ( cohort_users ) ) #NEWLINE# for return_range in ranges [ ( i + 1 ) : ] : #NEWLINE# #INDENT# returned = count_contributors_in_range ( queryset , cohort_users , return_range ) #NEWLINE# data . append ( returned ) #NEWLINE# #UNINDENT# ( yield data )