Implement a function to reverse a linked list.
Asked in the Technical interview stage.
Implement reverse_linked_list(head), where head is the first node of a singly linked list. Return the new head after reversing the list in place. Each node has value and next attributes. Test inputs and outputs use arrays to represent linked lists, with [] representing None.
def reverse_linked_list(head):