xy_point = Point(reversed(point))
// calculate euclidean distance from each edge"s geometry to this point
edge_distances = [(edge, xy_point.distance(edge[3]))for edge in edges]
// the nearest edge minimizes the distance to the point
(u, v, key, geom), dist = min(edge_distances, key=lambda x: x[1])
After Change
// calculate euclidean distance from each edge"s geometry to this point
gs_edges = utils_graph.graph_to_gdfs(G, nodes=False)["geometry"]
uvk_geoms = zip(gs_edges.index, gs_edges.values)
distances = ((uvk, geom, xy_point.distance(geom)) for uvk, geom in uvk_geoms)
// the nearest edge minimizes the distance to the point
(u, v, key), geom, dist = min(distances, key=lambda x: x[2])
utils.log(f"Found nearest edge ({u, v, key}) to point {point}")