input: from typing import List
  import heapq
  def part_of_any_shortest_path(num_nodes: int, edge_list: List[List[int]]) -> List[bool]:
      """
      Given an undirected weighted graph with num_nodes vertices labeled from 0 to num_nodes - 1, the graph contains edges described by a 2D list edge_list, where edge_list[i] = [start_i, end_i, weight_i] signifies an edge connecting start_i and end_i with a weight of weight_i.
  
      Evaluate all shortest paths from node 0 to node num_nodes - 1. Determine a boolean array result such that result[i] is true if edge_list[i] is contained in any shortest path, otherwise false.
  
      Return the boolean array result.
  
      Note that the graph can be disconnected.
  
      Examples:
      >>> num_nodes = 6, edge_list = [[0,1,4],[0,2,1],[1,3,2],[1,4,3],[1,5,1],[2,3,1],[3,5,3],[4,5,2]]
      [true,true,true,false,true,true,true,false]
      >>> num_nodes = 4, edge_list = [[2,0,1],[0,1,1],[0,3,4],[3,2,2]]
      [true,false,false,true]
  
      Constraints:
      2 <= num_nodes <= 5 * 10^4
      e == edge_list.length
      1 <= e <= min(5 * 10^4, num_nodes * (num_nodes - 1) / 2)
      0 <= start_i, end_i < num_nodes
      start_i != end_i
      1 <= weight_i <= 10^5
      There are no duplicate edges.
      """
output:     # Write an adjacency list for the graph
      graph = {i: [] for i in range(num_nodes)}
      for start, end, weight in edge_list:
          graph[start].append((end, weight))
          graph[end].append((start, weight))  # Since the graph is undirected
  
      def dijkstra(source):
          dist = {i: float('inf') for i in range(num_nodes)}
          dist[source] = 0
          priority_queue = [(0, source)]
          heapq.heapify(priority_queue)
          
          while priority_queue:
              curr_dist, u = heapq.heappop(priority_queue)
              if curr_dist > dist[u]:
                  continue
              
              for v, weight in graph[u]:
                  if dist[u] + weight < dist[v]:
                      dist[v] = dist[u] + weight
                      heapq.heappush(priority_queue, (dist[v], v))
          
          return dist
  
      # Get shortest distances from node 0 to all nodes and from node num_nodes - 1 to all nodes
      dist_from_start = dijkstra(0)
      dist_from_end = dijkstra(num_nodes - 1)
      shortest_path_length = dist_from_start[num_nodes - 1]
      
      result = []
  
      # Check each edge if it is part of any shortest path
      for start, end, weight in edge_list:
          if (dist_from_start[start] + weight + dist_from_end[end] == shortest_path_length) or (dist_from_start[end] + weight + dist_from_end[start] == shortest_path_length):
              result.append(True)
          else:
              result.append(False)
      
      return result