def METHOD_NAME(build):
    previous_build = None
    try:
        previous_build = build.get_previous_by_created_at(project=build.project)
    except Build.DoesNotExist:
        pass
    if previous_build:
        return build_url(previous_build)