<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_previous_node(node):
 """ Return the node before this node. """

    if node.prev_sibling:
        return node.prev_sibling
    if node.parent:
        return get_previous_node(node.parent)