#NEWLINE# def mark_done( client , task_id ) : #NEWLINE# #INDENT# with client . transaction ( ) : #NEWLINE# #INDENT# key = client . key ( 'Task' , task_id ) #NEWLINE# task = client . get ( key ) #NEWLINE# if ( not task_id ) : #NEWLINE# #INDENT# raise ValueError ( 'Task {} does not exist.' . format ( task_id ) ) #NEWLINE# #UNINDENT# task [ 'done' ] = True #NEWLINE# client . put ( task )