def METHOD_NAME(self, ctx=None):
    """
    Return a dict of templates with the context merged in
    We look first at the field templates but fail over to
    a set of file templates that follow a conventional path.
    """
    code = self.code.lower()
    # Build a dict of message name to Template instances
    templates = {
        "subject": "email_subject_template",
        "body": "email_body_template",
        "html": "email_body_html_template",
        "sms": "sms_template",
    }
    for name, attr_name in templates.items():
        field = getattr(self, attr_name, None)
        if field is not None:
            # Template content is in a model field
            templates[name] = engines["django"].from_string(field)
        else:
            # Model field is empty - look for a file template
            template_name = getattr(self, "%s_file" % attr_name) % code
            try:
                templates[name] = get_template(template_name)
            except TemplateDoesNotExist:
                templates[name] = None
    # Pass base URL for serving images within HTML emails
    if ctx is None:
        ctx = {}
    ctx["static_base_url"] = getattr(settings, "OSCAR_STATIC_BASE_URL", None)
    messages = {}
    for name, template in templates.items():
        # pylint: disable=no-member
        messages[name] = template.render(ctx) if template else ""
    # Ensure the email subject doesn't contain any newlines
    messages["subject"] = messages["subject"].replace("\n", "")
    messages["subject"] = messages["subject"].replace("\r", "")
    return messages