#NEWLINE# def getextends( type ) : #NEWLINE# #INDENT# '\n    Returns a list of classes that the object with the given type extends.\n    @param type (str) Object type\n    @retval List of object types that are extended by given type\n    ' #NEWLINE# ret = [ ] #NEWLINE# base_clzz = model_classes [ type ] #NEWLINE# for name in model_classes : #NEWLINE# #INDENT# clzz = model_classes [ name ] #NEWLINE# bases = inspect . getmro ( clzz ) #NEWLINE# if ( base_clzz in bases ) : #NEWLINE# #INDENT# ret . append ( name ) #NEWLINE# #UNINDENT# #UNINDENT# return ret