#NEWLINE# def generic_create( pk , klass , data ) : #NEWLINE# #INDENT# instance = klass ( id = pk ) #NEWLINE# instance . data = data [ 0 ] #NEWLINE# instance . save ( ) #NEWLINE# for tag in klass [ 1 : ] : #NEWLINE# #INDENT# instance . tags . create ( data = tag ) #NEWLINE# #UNINDENT# return instance