<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _setStyle(node, styleMap):
 u"""Sets the style attribute of a node to the dictionary ``styleMap``."""

    fixedStyle = ';'.join([prop + ':' + styleMap[prop] for prop in styleMap])
    if fixedStyle != '':
        node.setAttribute('style', fixedStyle)
    elif node.getAttribute('style'):
        node.removeAttribute('style')
    return node