Toggle Subdivision Surface Modifier on selected Objects

hey guys,

is it somehow possible to just toggle the “last” subd modifier on all selected objects?
so if the object only has 1 subd modifier this should get toggled
and if the object has 2 subd modifiers only the last one should get toggled.

cheers christian