code: def initialize_single_source(graph, source, weight, pre_node):
      """
      Initialize data structures for Bellman-Ford algorithm.
      """
      for node in graph:
          weight[node] = float("inf")
          pre_node[node] = None
  
      weight[source] = 0
  
label_desc: Use image node_id 2 for calling a global function with example usage: initialize_single_source(graph, source, weight, pre_node) without return types