def __init__(self, parent_model=None, model=None, formset_class=None,<EOL>kwargs=None, **factory_kwargs):
<EOL>field_kwargs = {}<EOL>for arg in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT:label>', '<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>if arg in factory_kwargs:<EOL><INDENT>field_kwargs[arg] = factory_kwargs.pop(arg)<EOL><DEDENT><DEDENT>self.parent_model = parent_model<EOL>self.model = model<EOL>self.formset_factory_kwargs = factory_kwargs<EOL>super(InlineFormSetField, self).__init__(formset_class, kwargs=kwargs,<EOL>**field_kwargs)<EOL>if (<EOL>self.formset_class is None and<EOL>'<STR_LIT>' not in self.formset_factory_kwargs and<EOL>'<STR_LIT>' not in self.formset_factory_kwargs and<EOL>'<STR_LIT>' not in self.formset_factory_kwargs):<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>.format(self.__class__.__name__))<EOL><DEDENT>
You need to either provide the ``formset_class`` or the ``model``
argument.

If the ``formset_class`` argument is not given, the ``model`` argument
is used to create the formset_class on the fly when needed by using the
``inlineformset_factory``.