An Eaton diagnostic routine receives a device label and an ordered sequence of readings. Determine whether the label is a palindrome, then reverse the first half of the readings in place. For serialization, the linked list is represented by a Python list of node values, where the list order matches linked-list traversal order.
The first half contains floor(n / 2) nodes. For odd-length lists, the middle node remains in its original position. Return both results without changing the label.
Implement analyze_and_reverse(label, values).
label is a string containing letters, digits, spaces, or punctuation. Compare characters exactly, including case and non-alphanumeric characters.values is a mutable list of integers representing linked-list node values.is_palindrome, a boolean, and values, the modified list.floor(len(values) / 2) values in place.def analyze_and_reverse(label, values):