docs: def __calculate_edge_weights(dfs_data):
      """Calculates the weight of each edge, for embedding-order sorting."""
      graph = dfs_data['graph']
  
      weights = {}
      for edge_id in graph.get_all_edge_ids():
          edge_weight = __edge_weight(edge_id, dfs_data)
          weights[edge_id] = edge_weight
  
      return weights