How would you pairwise rotate or swap the elements in a linked list?
Implement pairwise_swap(head) to swap adjacent nodes by changing links, not node values. The input is a singly linked list, and the output is its new head. For grading, linked lists are represented as arrays of values before and after serialization.
def pairwise_swap(head):