Describe how you implement unit tests and apply data structures and algorithms to solve a problem.
Implement shortest_path(graph, start, end) using an appropriate data structure and algorithm. The graph is a directed adjacency map whose values are [neighbor, weight] pairs. Return the nodes in a minimum-weight path from start to end, or [] when no path exists. Explain the unit tests you would use, including normal cases, boundary cases, and unreachable nodes.
def shortest_path(graph, start, end):