def cg_has_cgsnapshot_filter():
 return sql.exists().where(and_((models.Cgsnapshot.consistencygroup_id == models.ConsistencyGroup.id), (~ models.Cgsnapshot.deleted)))

def cg_has_cgsnapshot_filter ( ) : return sql . exists ( ) . where ( and_ ( ( models . Cgsnapshot . consistencygroup_id == models . ConsistencyGroup . id ) , ( ~ models . Cgsnapshot . deleted ) ) )
return a filter that checks if a cg has cg snapshots .