input: def organize_list(arr):
      """
      Given a list of non-negative integers, return a duplicate of the list after organizing it.
      Sort the list in ascending order if the sum of the first and last elements is odd,
      or in descending order if the sum is even.
  
      Note:
      * Do not alter the original list.
  
      Examples:
      * organize_list([]) => []
      * organize_list([5]) => [5]
      * organize_list([2, 4, 3, 0, 1, 5]) => [0, 1, 2, 3, 4, 5]
      * organize_list([2, 4, 3, 0, 1, 5, 6]) => [6, 5, 4, 3, 2, 1, 0]
      """
output:     
      if not arr:
          return []
  
      first_last_sum = arr[0] + arr[-1]
      sorted_arr = sorted(arr)
  
      if first_last_sum % 2 == 0:
          return sorted_arr[::-1]
      else:
          return sorted_arr
  