#NEWLINE# def get_operation( mode , property ) : #NEWLINE# #INDENT# "\n    This returns the object definition function for a particular property\n    or mode. mode should either be 'set' or 'get'.\n    " #NEWLINE# prop = unicode ( property ) #NEWLINE# if ( ( prop in OBJECT_DEFINITIONS ) and ( mode in OBJECT_DEFINITIONS [ property ] ) ) : #NEWLINE# #INDENT# return OBJECT_DEFINITIONS [ prop ] [ mode ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( mode == 'set' ) and prop . startswith ( 'on' ) and ( len ( prop ) > 2 ) ) : #NEWLINE# #INDENT# return set_on_event