<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def default_weight(element):
 """Return weight of formula element. This implements the default weight proposed for MapMaker. """

    if element in (Atom.N, Atom.O, Atom.P):
        return 0.4
    elif isinstance(element, Radical):
        return 40.0
    return 1.0