#NEWLINE# @ classmethod #NEWLINE# def register( cls , resource_body_cls ) : #NEWLINE# #INDENT# 'Register resource.' #NEWLINE# resource_type = cls . resource_type #NEWLINE# assert ( resource_type not in cls . _REGISTERED_TYPES ) #NEWLINE# cls . _REGISTERED_TYPES [ resource_type ] = resource_body_cls #NEWLINE# return resource_body_cls