#NEWLINE# def register_task( kind , task_class , override = False ) : #NEWLINE# #INDENT# '\n    Register a new task implementation with the execution system\n    ' #NEWLINE# if ( ( kind in _task_registry ) and ( not override ) ) : #NEWLINE# #INDENT# raise KeyError ( 'Task of type %s is already defined and override is False' ) #NEWLINE# #UNINDENT# _task_registry [ kind ] = task_class