#NEWLINE# def recurse( query , index ) : #NEWLINE# #INDENT# "\n    Recursively walk across paths, adding leaves to the index as they're found.\n    " #NEWLINE# for node in app . store . find ( query ) : #NEWLINE# #INDENT# if node . is_leaf : #NEWLINE# #INDENT# index . add ( node . path ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# recurse ( '{0}.*' . format ( node . path ) , index )