'Adds a new `VisualizationRevision` to the given `visualization` with
the given parameters and set its parent visualization\'s `latest_revision`
to the new revision.'

def add_visualization_revision(self, trans, visualization, config, title, dbkey):

    revision = trans.model.VisualizationRevision(visualization, title, dbkey, config)
    visualization.latest_revision = revision
    trans.sa_session.add(revision)
    trans.sa_session.flush()
    return revision
