'Save (on POST) or load (on GET) a visualization then render.'

@web.expose
@web.require_login('use    Galaxy    visualizations', use_panels=True)
def saved(self, trans, id=None, revision=None, type=None, config=None, title=None, **kwargs):

    if (trans.request.method == 'POST'):
        self._POST_to_saved(trans, id=id, revision=revision, type=type, config=config, title=title, **kwargs)
    if (id is None):
        return HTTPBadRequest('A    valid    visualization    id    is    required    to    load    a    visualization')
    visualization = self.get_visualization(trans, id, check_ownership=False, check_accessible=True)
    if title:
        kwargs['title'] = title
    plugin = self._get_plugin_from_registry(trans, visualization.type)
    try:
        return plugin.render_saved(visualization, trans=trans, **kwargs)
    except Exception as exception:
        self._handle_plugin_error(trans, visualization.type, exception)
