#NEWLINE# def in_context( func ) : #NEWLINE# #INDENT# '\n    Decorator for running methods in context. The context is the object (self).\n    ' #NEWLINE# @ wraps ( func ) #NEWLINE# def in_context_wrapper( self , * args , **kwargs ) : #NEWLINE# #INDENT# with context ( self ) : #NEWLINE# #INDENT# return func ( self , * args , ** kwargs ) #NEWLINE# #UNINDENT# #UNINDENT# return func