How would you reorder two linked lists by alternating nodes from each list, and then write unit tests?
Implement reorder_lists(head1, head2) using a ListNode structure with value and next fields. Return one in-place list starting with head1, alternating nodes while either list has remaining nodes. Unit tests should compare the resulting values and cover equal lengths, unequal lengths, empty inputs, and singleton lists.
def reorder_lists(head1, head2):