#NEWLINE# def _GetOpeningParen( current ) : #NEWLINE# #INDENT# previous = current #NEWLINE# while ( ( previous is not None ) and ( current . matching_bracket is None ) ) : #NEWLINE# #INDENT# previous = previous . previous_token #NEWLINE# if previous . ClosesScope ( ) : #NEWLINE# #INDENT# previous = previous . matching_bracket . previous_token #NEWLINE# #UNINDENT# #UNINDENT# return previous