the whole method ends by returning the updated table to print the tablewe use the following statementsshortest_distance_table find_shortest_path(graphtable' 'for in sorted(shortest_distance_table)print("{{}format( ,shortest_distance_table[ ])output for the preceding statementa [ noneb [ ' ' [ ' ' [ ' ' [ ' ' [ ' 'for the sake of completenesslet' find out what the helper methods are doingdef get_shortest_distance(tablevertex)shortest_distance table[vertex][distancereturn shortest_distance the get_shortest_distance function returns the value stored in the zeroth index of our table at that indexwe always store the shortest distance from the starting node up to vertex the set_shortest_distance function only sets this value by the followingdef set_shortest_distance(tablevertexnew_distance)table[vertex][distancenew_distance when we update the shortest distance of nodewe update its previous node using the following methoddef set_previous_node(tablevertexprevious_node)table[vertex][previous_nodeprevious_node remember that the constantprevious_nodeequals in the tablewe store the value of the previous_node at table[vertex][previous_nodeto find the distance between any two nodeswe use the get_distance functiondef get_distance(graphfirst_vertexsecond_vertex)return graph[first_vertex][second_vertex