#NEWLINE# def update_or_create( self , model , **kwargs ) : #NEWLINE# #INDENT# 'Update or create a new instance of ``model``.\n\n        This method can raise an exception if the ``kwargs`` dictionary\n        contains field data that does not validate.\n\n        :param model: a :class:`StdModel`\n        :param kwargs: dictionary of parameters.\n        :returns: A two elements tuple containing the instance and a boolean\n            indicating if the instance was created or not.\n        ' #NEWLINE# backend = self . model ( model ) . backend #NEWLINE# return backend . execute ( self . _update_or_create ( model , ** kwargs ) )