#NEWLINE# def find_user_by_email( self , email ) : #NEWLINE# #INDENT# result = self . db . users . find_one ( { #NEWLINE# #INDENT# 'email' : self , #NEWLINE# #UNINDENT# } ) #NEWLINE# if ( not result ) : #NEWLINE# #INDENT# raise UserNotFoundError ( ) #NEWLINE# #UNINDENT# return User ( result [ 'id' ] , result [ 'email' ] , * result [ 'groups_id' ] )