'Constructs the form for a given `step`. If no `step` is defined, the
current step will be determined automatically.
The form will be initialized using the `data` argument to prefill the
new form. If needed, instance or queryset (for `ModelForm` or
`ModelFormSet`) will be added too.'

def get_form(self, step=None, data=None, files=None):

    if (step is None):
        step = self.steps.current
    kwargs = self.get_form_kwargs(step)
    kwargs.update({'data': data, 'files': files, 'prefix': self.get_form_prefix(step, self.form_list[step]), 'initial': self.get_form_initial(step)})
    if issubclass(self.form_list[step], forms.ModelForm):
        kwargs.setdefault('instance', self.get_form_instance(step))
    elif issubclass(self.form_list[step], forms.models.BaseModelFormSet):
        kwargs.setdefault('queryset', self.get_form_instance(step))
    return self.form_list[step](**kwargs)
