We have several users in our group who create ArcGIS Pro projects and a colleague & I are responsible for publishing them as map services to one of our Portals. There are occasions when our Pro authors copy and paste layers in the project, creating duplicate layer IDs, or move layers around in the project. Is there an ArcPy method where we can auto-generate new layer IDs starting from the first layer in the list (i.e.: 0 to N -1 layers)? It does not matter that we wipe out and re-set the layer IDs in the corresponding map services. Thanks.