#NEWLINE# @ classmethod #NEWLINE# def update( cls , instance , data ) : #NEWLINE# #INDENT# 'Update existing instance with specified parameters\n\n        :param instance: object (model) instance\n        :param data: dictionary of key-value pairs as object fields\n        :returns: instance of an object (model)\n        ' #NEWLINE# instance . update ( data ) #NEWLINE# db ( ) . add ( instance ) #NEWLINE# db ( ) . flush ( ) #NEWLINE# return instance