<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def subject_template(template, context):
 """ Loads and renders an email subject template, returning the subject string. """

    subject = loader.get_template(template).render(Context(context))
    return " ".join(subject.splitlines()).strip()