#NEWLINE# def define( self , klass , name = 'default' ) : #NEWLINE# #INDENT# '\n        Define a class with a given set of attributes.\n\n        :param klass: The class\n        :type klass: class\n\n        :param name: The short name\n        :type name: str\n        ' #NEWLINE# def decorate( func ) : #NEWLINE# #INDENT# @ wraps ( func ) #NEWLINE# def wrapped( * args , **kwargs ) : #NEWLINE# #INDENT# return func ( * args , ** kwargs ) #NEWLINE# #UNINDENT# self . register ( klass , func , name = name ) #NEWLINE# return wrapped #NEWLINE# #UNINDENT# return self