input: Write a function to determine if it is possible to get a linked list sorted in non-decreasing order by performing any number of right shift operations on the given linked list. If it is possible return True else return False. If the given linked list is empty then return True.
  
  
  assert is_sorted_by_shifts(None)==True
  assert is_sorted_by_shifts(Node(1))==True
  assert is_sorted_by_shifts(LinkedList.from_list([3, 4, 5, 1, 2]))==True
  assert is_sorted_by_shifts(LinkedList.from_list([3, 5, 10, 1, 2]))==True
  assert is_sorted_by_shifts(LinkedList.from_list([4, 3, 1, 2]))==False
  assert is_sorted_by_shifts(LinkedList.from_list([3, 5, 4, 1, 2]))==False
  
output: def is_sorted_by_shifts(head):
      if not head:
          return True
      
      values = []
      current = head
      while current:
          values.append(current.val)
          current = current.next
      
      n = len(values)
      if n == 1:
          return True
      
      for i in range(n):
          if values[i:] + values[:i] == sorted(values):
              return True
      
      return False