I have an undirected network with edge weights. each node has an attribute "group". I want to change the existing weights discounting those edges between nodes wit