#NEWLINE# def publisher( type_name = '' , publisher_type = PRE_PUBLISHER_TYPE ) : #NEWLINE# #INDENT# 'A decorator to easily register a method or function as a publisher\n\n    :param str type_name: The name of this publisher type.\n    :param int publisher_type: 0 for pre 1 for post publishers\n    ' #NEWLINE# def wrapper( f ) : #NEWLINE# #INDENT# register_publisher ( f , type_name , publisher_type ) #NEWLINE# return f #NEWLINE# #UNINDENT# if callable ( type_name ) : #NEWLINE# #INDENT# f = type_name #NEWLINE# type_name = '' #NEWLINE# return wrapper ( f ) #NEWLINE# #UNINDENT# return wrapper