def __init__(self, data=None, files=None, instance=None, prefix=None, **kwargs):
        super(ClusterForm, self).__init__(data, files, instance=instance, prefix=prefix, **kwargs)

        self.formsets = {}
        for rel_name, formset_class in self.__class__.formsets.items():
            if prefix:
                formset_prefix = "%s-%s" % (prefix, rel_name)
            else:
                formset_prefix = rel_name
            self.formsets[rel_name] = formset_class(data, files, instance=instance, prefix=formset_prefix)

        if self.is_bound and not self._has_explicit_formsets:
            # check which formsets have actually been provided as part of the form submission -
            # if no `formsets` or `exclude_formsets` was specified, we allow them to be omitted
            # (https://github.com/wagtail/wagtail/issues/5414#issuecomment-567468127).
            self._posted_formsets = [
                formset
                for formset in self.formsets.values()
                if '%s-%s' % (formset.prefix, TOTAL_FORM_COUNT) in self.data
            ]
        else:
            # expect all defined formsets to be part of the post
            self._posted_formsets = self.formsets.values()