#NEWLINE# @ contextmanager #NEWLINE# def group( self , indent = 0 , open = '' , close = '' ) : #NEWLINE# #INDENT# 'like begin_group / end_group but for the with statement.' #NEWLINE# self . begin_group ( indent , open ) #NEWLINE# try : #NEWLINE# #INDENT# with self . indent ( indent ) : #NEWLINE# #INDENT# ( yield ) #NEWLINE# #UNINDENT# #UNINDENT# finally : #NEWLINE# #INDENT# self . end_group ( indent , close )