Write a python function to implement Dijkstra’s shortest path algorithm. this was given def...

Write a python function to implement Dijkstra’s shortest path algorithm. this was given def dijkstraShortestPath(G,startV): unvisited = [i for i in range] dist = [math.inf for v in G] path = [-1 for v in G] dist[startV]=0 while len(unvisited)>0: currentV= unvistited[0] for v in unvisited[1:]: if dist[v]<> currentV = v #remove currentV from unvisited for edge in G[currentV]: currentV, edgeweight = edge[0], edge[1]