def METHOD_NAME(self, user_id, template_id):
    with app.app_context():
        user = r.table("users").get(user_id).run(db.conn)
    if user == None:
        raise Error("not_found", "User not found", traceback.format_exc())
    # Create the domain from that template
    desktop_id = self._nonpersistent_desktop_from_tmpl(user_id, template_id)
    desktop_start(desktop_id)
    return desktop_id