def get_parent_snap(f):
    """
    Find the parent (last ancestor) of SubSnap f
    """
    parent = f.ancestor
    while parent != f:
        f = parent
        parent = f.ancestor
    
    return parent