

def render_preview(self, template_name, styles, **args):
    replacer = InlineFormReplacer.make(self.settings, args, template_name)
    if styles:
        placeholders = replacer.placeholders((lambda missing_key: '???'))
        html = HtmlRenderer(Template(template_name, styles), self.settings, '').render(placeholders)
    else:
        html = self.resource('preview.no.styles.html')
    return (html, (styles and (not replacer.required)))

dataset/ETHPy150Open KeepSafe/ks-email-parser/email_parser/gui/gui.py InlineFormRenderer.render_preview/original