Get the middle element of a linked list.
Asked in the technical_1 stage. Given the head of a non-empty singly linked list, return the value of its middle node. If the list has an even number of nodes, return the second of the two middle nodes.
The function receives a ListNode head. Test inputs represent linked lists as arrays of node values, in traversal order. Return an integer value.
def middle_node(head):