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