#NEWLINE# def create_as( self , klass , name , **attributes ) : #NEWLINE# #INDENT# '\n        Create an instance of the given model and type and persist it to the database.\n\n        :param klass: The class\n        :type klass: class\n\n        :param name: The type\n        :type name: str\n\n        :param attributes: The instance attributes\n        :type attributes: dict\n\n        :return: mixed\n        ' #NEWLINE# return self . of ( klass , name ) . create ( ** name )