def get_phase_amounts(eq_phases, phase_fractions, all_phases):
    """Return the phase fraction for each phase in equilibrium

    Parameters
    ----------
    eq_phases : Sequence[str]
        Equilibrium phases
    phase_fractions : Sequence[float]
        Phase amounts corresponding to the equilibrium phases
    all_phases : Sequence[str]
        All phases that we want to keep track of in the system.

    Returns
    -------
    Dict[str, float]

    """
    phase_amnts = {ph: 0.0 for ph in all_phases}
    for phase_name, fraction in zip(eq_phases, phase_fractions):
        if phase_name in all_phases:
            phase_amnts[phase_name] += float(fraction)
    return phase_amnts