// for each unique different street, iterate its key + 1 so it"s unique
for u, v, k in set(different_streets):
// filter out key if it appears in data dict as we"ll pass it explicitly
attributes = {k: v for k, v in G[u][v][k].items() if k != "key"}
G.add_edge(u, v, key=k + 1, **attributes)
G.remove_edge(u, v, key=k)
After Change
for _, group in groups:
// for each pair of edges within this group
for geom1, geom2 in itertools.combinations(group["geometry"], 2):
// if they don"t have the same geometry, flag them as different streets
// add edge uvk, but not edge vuk, otherwise we"ll iterate both their keys