#NEWLINE# def _get_form_by_id( self ) : #NEWLINE# #INDENT# assert ( self . form_page is not None ) , 'Non-existent or invalid form page.' #NEWLINE# forms_in_page = html . fromstring ( self . form_page . text ) . forms #NEWLINE# for form in forms_in_page : #NEWLINE# #INDENT# if ( form . get ( 'id' ) == self . get_form_id ( ) ) : #NEWLINE# #INDENT# return form