<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fields_for(context, form, template="includes/form_fields.html"):
 """ Renders fields for a form with an optional template choice. """

    context["form_for_fields"] = form
    return get_template(template).render(context)