def METHOD_NAME(name: str):
    preview_data = _get_preview_data()
    if name not in preview_data:
        raise HTTPException(status_code=404)
    info = EmailInfo(
        category=preview_data[name]["category"],
        subject="Test email",
        app_id="com.example.Test",
        template_data=preview_data[name]["data"],
    )
    preview = _create_html(info, "Test App", "test@example.com", "Test User")
    return f"""
        {preview}
        <div style="margin-top: 5em"/>
        <a href="../preview">Back to list of templates</a>
    """