#NEWLINE# def remove_kind( kind , client ) : #NEWLINE# #INDENT# results = [ ] #NEWLINE# ( query , curr_results , cursor ) = fetch_keys ( kind , client ) #NEWLINE# results . extend ( curr_results ) #NEWLINE# while curr_results : #NEWLINE# #INDENT# ( query , curr_results , cursor ) = fetch_keys ( kind , client , query = query , cursor = cursor ) #NEWLINE# results . extend ( curr_results ) #NEWLINE# #UNINDENT# if ( not results ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# delete_outside_transaction = False #NEWLINE# with client . transaction ( ) : #NEWLINE# #INDENT# print_func ( 'Deleting keys:' ) #NEWLINE# print_func ( results ) #NEWLINE# ancestors = get_ancestors ( results ) #NEWLINE# if ( len ( ancestors ) > TRANSACTION_MAX_GROUPS ) : #NEWLINE# #INDENT# delete_outside_transaction = True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# client . delete_multi ( [ result . key for result in results ] ) #NEWLINE# #UNINDENT# #UNINDENT# if delete_outside_transaction : #NEWLINE# #INDENT# client . delete_multi ( [ results . key for result in results ] )