input: Write a function to check if a given list of integers is sorted in non-decreasing order after performing any number of right shift operations. If it is possible to sort the array, return True, otherwise return False. If the given list is empty, return True.
  
  assert is_sorted_after_shifts([3, 4, 5, 1, 2])==True
  assert is_sorted_after_shifts([3, 5, 10, 1, 2])==True
  assert is_sorted_after_shifts([4, 3, 1, 2])==False
  assert is_sorted_after_shifts([3, 5, 4, 1, 2])==False
  assert is_sorted_after_shifts([])==True
output: def is_sorted_after_shifts(arr):
      if not arr:
          return True
      n = len(arr)
      for i in range(n):
          if all(arr[j] <= arr[j + 1] for j in range(n - 1)):
              return True
          arr = arr[-1:] + arr[:-1]
      return False