#NEWLINE# def _get_scope_with_symbol( self , name ) : #NEWLINE# #INDENT# 'Return a scope containing passed name as a symbol name.' #NEWLINE# scope = self #NEWLINE# while True : #NEWLINE# #INDENT# parent = scope . get_enclosing_scope ( ) #NEWLINE# if ( parent is None ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( self in parent . symbols ) : #NEWLINE# #INDENT# return parent #NEWLINE# #UNINDENT# scope = parent