#NEWLINE# def filterIncludingParents( self , itemId , includedItems ) : #NEWLINE# #INDENT# 'Scans the itemId and all its children for which items should be\n        included when filtering. All items which passes the filters are\n        included. Additionally all items that have a child node that should be\n        included are also themselves included.\n\n        @return: true if the itemId should be included in the filtered\n                container.\n        ' #NEWLINE# toBeIncluded = self . passesFilters ( itemId ) #NEWLINE# childList = self . _children . get ( itemId ) #NEWLINE# if ( childList is not None ) : #NEWLINE# #INDENT# for childItemId in self . _children . get ( itemId ) : #NEWLINE# #INDENT# toBeIncluded = ( toBeIncluded | self . filterIncludingParents ( childItemId , includedItems ) ) #NEWLINE# #UNINDENT# #UNINDENT# if toBeIncluded : #NEWLINE# #INDENT# includedItems . add ( itemId ) #NEWLINE# #UNINDENT# return toBeIncluded