#NEWLINE# @ gen . coroutine #NEWLINE# def RemovePhotos( self , client , user_id , viewpoint_id , photo_ids ) : #NEWLINE# #INDENT# "Add accounting changes caused by removing photos from a user's default viewpoint.\n      - photo_ids: list of photos that were removed (caller should exclude the ids of any\n                   photos that were already removed).\n\n    We need to query all photos for size information. Creates the following entries:\n      - (vs:<viewpoint>, ow:<user>): stats for user in default viewpoint.\n      - (us:<user>, ow): overall stats for user.\n    " #NEWLINE# photo_keys = [ DBKey ( photo_id , None ) for photo_id in photo_ids ] #NEWLINE# photos = ( yield gen . Task ( Photo . BatchQuery , client , photo_keys , None ) ) #NEWLINE# self . GetViewpointOwnedBy ( viewpoint_id , user_id ) . DecrementFromPhotos ( photos ) #NEWLINE# self . GetUserOwnedBy ( user_id ) . CopyStatsFrom ( self . GetViewpointOwnedBy ( viewpoint_id , user_id ) )