def get_render(self, context):
<EOL>if self not in context.render_context:<EOL><INDENT>context.render_context[self] = (<EOL>template.Variable(self.form),<EOL>template.Variable(self.helper) if self.helper else None<EOL>)<EOL><DEDENT>form, helper = context.render_context[self]<EOL>actual_form = form.resolve(context)<EOL>if self.helper is not None:<EOL><INDENT>helper = helper.resolve(context)<EOL><DEDENT>else:<EOL><INDENT>helper = FormHelper() if not hasattr(actual_form, '<STR_LIT>') else actual_form.helper<EOL><DEDENT>try:<EOL><INDENT>if helper.template_pack:<EOL><INDENT>self.template_pack = helper.template_pack<EOL><DEDENT><DEDENT>except AttributeError:<EOL><INDENT>pass<EOL><DEDENT>self.actual_helper = helper<EOL>is_formset = isinstance(actual_form, BaseFormSet)<EOL>response_dict = self.get_response_dict(helper, context, is_formset)<EOL>node_context = context.__copy__()<EOL>node_context.update(response_dict)<EOL>final_context = node_context.__copy__()<EOL>if helper and helper.layout:<EOL><INDENT>if not is_formset:<EOL><INDENT>actual_form.form_html = helper.render_layout(actual_form, node_context, template_pack=self.template_pack)<EOL><DEDENT>else:<EOL><INDENT>forloop = ForLoopSimulator(actual_form)<EOL>helper.render_hidden_fields = True<EOL>for form in actual_form:<EOL><INDENT>node_context.update({'<STR_LIT>': forloop})<EOL>node_context.update({'<STR_LIT>': form})<EOL>form.form_html = helper.render_layout(form, node_context, template_pack=self.template_pack)<EOL>forloop.iterate()<EOL><DEDENT><DEDENT><DEDENT>if is_formset:<EOL><INDENT>final_context['<STR_LIT>'] = actual_form<EOL><DEDENT>else:<EOL><INDENT>final_context['<STR_LIT>'] = actual_form<EOL><DEDENT>return final_context<EOL>
Returns a `Context` object with all the necessary stuff for rendering the form

:param context: `django.template.Context` variable holding the context for the node

`self.form` and `self.helper` are resolved into real Python objects resolving them
from the `context`. The `actual_form` can be a form or a formset. If it's a formset
`is_formset` is set to True. If the helper has a layout we use it, for rendering the
form or the formset's forms.