def save(self, backref_obj=None):
if not self.validated:<EOL><INDENT>assert self.is_valid()<EOL><DEDENT>if self._model and not self._obj:<EOL><INDENT>obj = self._save_new_object(backref_obj)<EOL><DEDENT>else:<EOL><INDENT>obj = self.save_to(self._obj)<EOL><DEDENT>for key, subform in self._forms.items():<EOL><INDENT>data = subform.save(obj)<EOL>if self._model and not data:<EOL><INDENT>continue<EOL><DEDENT>set_obj_value(obj, key, data)<EOL><DEDENT>for key, formset in self._sets.items():<EOL><INDENT>data = formset.save(obj)<EOL>if self._model and not data:<EOL><INDENT>continue<EOL><DEDENT>set_obj_value(obj, key, data)<EOL><DEDENT>return obj<EOL>
Save the cleaned data to the initial object or creating a new one
        (if a `model_class` was provided).