from typing import Dict


def get_p_measured(protein_id_concentration_mapping: Dict[str, float],
                   protein_id_mass_mapping: Dict[str, float]) -> float:
    """Return p_measured (as defined in the GECKO paper) using the given arguments.

    Arguments
    ----------
    * protein_id_concentration_mapping: Dict[str, float] ~ The given concentrations
      of the proteins.
    * protein_id_mass_mapping: Dict[str, float] ~ The masses of the given proteins.
    """
    p_measured = .0
    measured_protein_ids = (protein_id_concentration_mapping.keys())
    for measured_protein_id in measured_protein_ids:
        # mmol/gDW
        protein_concentration = protein_id_concentration_mapping[measured_protein_id]
        # Da = g/mol
        protein_mass = protein_id_mass_mapping[measured_protein_id]
        # (mol/gDW) * (g/mol) = g/gDW
        protein_mass_concentration = (
            protein_concentration/1000) * protein_mass
        p_measured += protein_mass_concentration
    return p_measured