Dijkstra's algorithm in graph (Python)
Making an str(which makes a string from an object) for the node class which would simplify the graph return method
the str converts an object to a string type

is this a dense graph or sparse graph?
Sparse Graphs have a lot less edges between vertices
Sparse Graphs can be efficently used as adjency lists
Dense Graphs can be efficnetly represented with an adjency matrix (2d list of bool)
Note: if you are familar with binary, you can use an int to set and get bits in Python (more space efficent than 2d list)

I would suggest a new class for what to do when the algorithm reaches a node (such as NodeVisit)
This new class can a function called call(node) and run as object(the_node)
This allows diffrent code to run on node such as print out or add distances along a path

Dijkstra's algorithm has a lower Big O with a min priority que
Min priority ques are similar to real life lines with priority levels and tasks
This can be made from a list where left_row is 2 * row and right_row is (2 * row) + 1

Make a seperate function or even class for Dijkstra's algorithm
Dijkstra's algorithm can be done using parallel lists for vertex, distance, prev vertex
Looking up the wikipedia article for Dijkstra's Algorithm shows its psudo code

If you plan to use node anywhere else then make self.visited a parallel array and not inside the node class
Another situation where int and binary can be used for space efficency