#NEWLINE# def _build_parent_path( path , mapping , alt , lang ) : #NEWLINE# #INDENT# rv = [ ] #NEWLINE# for parent in _iter_parents ( path ) : #NEWLINE# #INDENT# info = _find_best_info ( ( mapping . get ( parent ) or [ ] ) , alt , lang ) #NEWLINE# id = _id_from_path ( info [ 'path' ] ) #NEWLINE# if ( info is None ) : #NEWLINE# #INDENT# title = ( id or '(Index)' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# title = info . get ( 'title' ) #NEWLINE# #UNINDENT# rv . append ( { #NEWLINE# #INDENT# 'id' : id , #NEWLINE# 'path' : parent , #NEWLINE# 'title' : title , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# return rv