<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mass_from_composition(composition):
 """ Calculates molecular mass from atomic weights Parameters composition: dict Dictionary mapping int (atomic number) to int (coefficient) Returns ------- float molecular weight in atomic mass units Notes ----- Atomic number 0 denotes charge or "net electron defficiency" Examples -------- '17.01' """

    mass = 0.0
    for k, v in composition.items():
        if k == 0:  # electron
            mass -= v*5.489e-4
        else:
            mass += v*relative_atomic_masses[k-1]
    return mass