def paths_prob_to_edges_flux(paths_prob):
    """Chops a list of paths into its edges, and calculate the probability
    of that edge across all paths.

    Parameters
    ----------
    paths: list of tuples
        list of the paths.

    Returns
    -------
    edge_flux: dictionary
        Edge tuples as keys, and probabilities as values.
    """
    edge_flux = {}
    for path, prob in paths_prob.items():
        for i in range(len(path) - 1):
            edge = path[i], path[i + 1]
            if edge in edge_flux:
                edge_flux[edge] += prob
            else:
                edge_flux[edge] = prob
    return edge_flux
