#NEWLINE# def get_single_node( self ) : #NEWLINE# #INDENT# self . get_event ( ) #NEWLINE# document = None #NEWLINE# if ( not self . check_event ( events . StreamEndEvent ) ) : #NEWLINE# #INDENT# document = self . compose_document ( ) #NEWLINE# #UNINDENT# if ( not self . check_event ( events . StreamEndEvent ) ) : #NEWLINE# #INDENT# event = self . get_event ( ) #NEWLINE# raise ComposerError ( 'expected a single document in the stream' , document . start_mark , 'but found another document' , event . start_mark ) #NEWLINE# #UNINDENT# self . get_event ( ) #NEWLINE# return event