<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_list_attributes(element1, element2, attributes):
 """ Copy a list of attributes of a element for other element. :param element1: The element that have attributes copied. :type element1: hatemile.util.html.htmldomelement.HTMLDOMElement :param element2: The element that copy the attributes. :type element2: hatemile.util.html.htmldomelement.HTMLDOMElement :param attributes: The list of attributes that will be copied. :type attributes: list(str) """


        for attribute in attributes:
            if element1.has_attribute(attribute):
                element2.set_attribute(
                    attribute,
                    element1.get_attribute(attribute)
                )