<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _required_attribute(element, name, default):
 """ Add attribute with default value to element if it doesn't already exist. """

    if element.get(name) is None:
        element.set(name, default)