So I am trying to drive a value inside a node tree by using a value from outside the node group. This works great for one instance of the group, but if I duplicate the node group, naturally the path in the expression does not work for the duplicate. Is there a bit of Python code which can update the name of the group in the path? I have added some images to illustrate what I am trying to do.

