code: def change_dist(dist: dict, i: int, j: int, new_cost: float) -> float:
      """Change the distance between two points.
  
      Args:
          dist (dict): distance matrix, where the key is a pair and value is
              the cost (aka, distance).
          i (int): the source node
          j (int): the destination node
          new_cost (float): the new cost for the distance
  
      Returns:
          float: the previous cost
      """
      prev_cost = dist[i, j]
      dist[i, j] = new_cost
      return prev_cost
  
label_desc: Use image node_id 1 for calling a global function with example usage: change_dist(dist, i, j, new_cost) and returns: prev_cost