def _add_element_attrs(elem, attrs):
 for (attr, value) in attrs.items():
  elem.attrib[attr] = value
 return elem

def _add_element_attrs ( elem , attrs ) : for ( attr , value ) in attrs . items ( ) : elem . attrib [ attr ] = value return elem
add attributes to the given element .