'Get a Visualization from the database by id, verifying ownership.'

def get_visualization(self, trans, id, check_ownership=True, check_accessible=False):

    try:
        visualization = trans.sa_session.query(trans.model.Visualization).get(trans.security.decode_id(id))
    except TypeError:
        visualization = None
    if (not visualization):
        error('Visualization    not    found')
    else:
        return self.security_check(trans, visualization, check_ownership, check_accessible)
