Write a function to find the shortest path between two nodes in an integration dependency graph.
Represent the graph as a directed adjacency dictionary where each node maps to [neighbor, cost] pairs, with nonnegative costs. Return the node sequence for a minimum-cost path, or [] when no path exists; if the start and destination are identical, return [start].
def shortest_path(graph, start, end):