#NEWLINE# @ classmethod #NEWLINE# def get_object_class_by_type( cls , obj_type ) : #NEWLINE# #INDENT# 'Gets an object class by its type. Types are CamelCased.\n\n        Refreshes once if the class is not found; subsequently, throws an\n        error.' #NEWLINE# if ( obj_type not in cls . objects_dict ) : #NEWLINE# #INDENT# cls . _refresh_registry ( ) #NEWLINE# #UNINDENT# if ( obj_type not in cls . objects_dict ) : #NEWLINE# #INDENT# raise TypeError ( ( "'%s' is not a valid object class." % obj_type ) ) #NEWLINE# #UNINDENT# return cls . objects_dict [ obj_type ]