def deepest_scope(v1, v2):
    """
    Returns the variable that is at the deepest scope. If they are equal in scope, then return v1.
    """
    s1 = v1.scope()
    s2 = v2.scope()
    if not s2.starts_with(s1):
        return v1
    if s1.starts_with(s2):
        return v1
    return v2
