Parse the total magnetization, which is somewhat hidden

def _parse_total_magnetization(line, lines):
    """Parse the total magnetization, which is somewhat hidden"""
    toks = line.split()
    res = {"number of electrons": float(toks[3])}
    if len(toks) > 5:
        res["total magnetization"] = float(toks[5])
    return res