Helper function to get the previous node from a node.
The node to get the previous node from
The previous node, or undefined if this is the first node
Helper function to get the previous node from a node.