Bright Data Interview Question

python question related to graphs, find all vertices in the shortest trajectory from node A to node B