input: 
  def num_unique_elements(arr):
      unique_arr = set(arr)
      return len(unique_arr)
  
  # Test cases:
  print(num_unique_elements([1, 2, 3, 2, 1, 4, 7, 8, 9, 8]))  # Output: 7
  print(num_unique_elements([10, 20, 30, 20, 30, 10]))  # Output: 3
  print(num_unique_elements([1, 1, 1, 1, 1]))  # Output: 1
  print(num_unique_elements([]))  # Output: 0
  print(num_unique_elements([1, 2, 3, 4, 5]))  # Output: 5
  
output:     unique_arr = set(arr)
      return len(unique_arr)