// get u, v, key, geom from all the graph edges
gdf_edges = utils_graph.graph_to_gdfs(G, nodes=False, fill_edge_geometry=True)
edges = gdf_edges[["u", "v", "key", "geometry"]].values
// convert lat,lng (y,x) point to x,y for shapely distance operation
xy_point = Point(reversed(point))
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])