def save_formsets(self, commit=True):
saved_composites = []<EOL>for name, composite in self.formsets.items():<EOL><INDENT>field = self.composite_fields[name]<EOL>if hasattr(field, '<STR_LIT>'):<EOL><INDENT>field.save(self, name, composite, commit=commit)<EOL>saved_composites.append(composite)<EOL><DEDENT><DEDENT>self._extend_save_m2m('<STR_LIT>', saved_composites)<EOL>
Save all formsets. If ``commit=False``, it will modify the form's
``save_m2m()`` so that it also calls the formsets' ``save_m2m()``
methods.