How to rename uvmaps in multiple objects I have hundreds of objects. Some have uvmap named "UVMap" while others have some other names. How do I change the uvmap name in all objects to UVMap?

I did find this but the script adds a new uvmap (UVMap.001) if the existing one is already named as UVMap: How to rename UVs of all the objects?. Because blender search does not sort by uvmap name I can't limit my selection to objects that have other name.
I figured out a very simple answer. First rename all uvmaps to something random like "bnoterp" that is not anywhere. That changes all (primary?) uvmaps to that name. Then after that rename all of them to "UVMap". That way the script does not create new uvmaps called UVMap.001 when it finds uvmaps with the same name as the script.