<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def persist_project(project):
 """ Persist this project in the benchbuild database. Args: project: The project we want to persist. """

    from benchbuild.utils.schema import Project, Session
    session = Session()
    projects = session.query(Project) \
        .filter(Project.name == project.name) \
        .filter(Project.group_name == project.group)

    name = project.name
    desc = project.__doc__
    domain = project.domain
    group_name = project.group
    version = project.version() \
        if callable(project.version) else project.version
    try:
        src_url = project.src_uri
    except AttributeError:
        src_url = 'unknown'

    if projects.count() == 0:
        newp = Project()
        newp.name = name
        newp.description = desc
        newp.src_url = src_url
        newp.domain = domain
        newp.group_name = group_name
        newp.version = version
        session.add(newp)
    else:
        newp_value = {
            "name": name,
            "description": desc,
            "src_url": src_url,
            "domain": domain,
            "group_name": group_name,
            "version": version
        }
        projects.update(newp_value)

    session.commit()
    return (projects, session)