#NEWLINE# def linearize( self ) : #NEWLINE# #INDENT# res = [ self ] #NEWLINE# for child in self . children ( ) : #NEWLINE# #INDENT# res . extend ( child . linearize ( ) ) #NEWLINE# #UNINDENT# return res