def get_formset_class(self, form, name):
if self.formset_class is not None:<EOL><INDENT>return self.formset_class<EOL><DEDENT>formset_class = inlineformset_factory(<EOL>self.get_parent_model(form, name),<EOL>self.get_model(form, name),<EOL>**self.formset_factory_kwargs)<EOL>return formset_class<EOL>
Either return the formset class that was provided as argument to the
__init__ method, or build one based on the ``parent_model`` and
``model`` attributes.