#NEWLINE# def get_nodes_recursive( project , include ) : #NEWLINE# #INDENT# children = list ( project . nodes ) #NEWLINE# descendants = ( children + [ item for node in project . nodes for item in get_nodes_recursive ( node , descendants ) ] ) #NEWLINE# return ( [ project ] + [ desc for desc in descendants if include ( desc ) ] )