input: def by_length(arr):
      """
      Sort the integers from 1 to 9 within the given array in ascending order, reverse this sorted array,
      and substitute each digit with its corresponding word from "One" to "Nine".
  
      For example:
        arr = [2, 1, 1, 4, 5, 8, 2, 3]   
              -> sorted arr -> [1, 1, 2, 2, 3, 4, 5, 8] 
              -> reversed arr -> [8, 5, 4, 3, 2, 2, 1, 1]
        return ["Eight", "Five", "Four", "Three", "Two", "Two", "One", "One"]
      
        If the input array is empty, return an empty list:
        arr = []
        return []
      
        Exclude any number outside the range [1, 9]:
        arr = [1, -1, 55] 
              -> sorted arr -> [-1, 1, 55]
              -> reversed arr -> [55, 1, -1]
        return = ['One']
      """
output:     
      words = ["One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"]
  
      # Filter numbers from 1 to 9
      filtered_nums = [num for num in arr if 1 <= num <= 9]
      
      # Sort the filtered numbers in ascending order
      sorted_nums = sorted(filtered_nums)
      
      # Reverse the sorted array
      reversed_nums = sorted_nums[::-1]
      
      # Convert each number to its corresponding word
      result = [words[num - 1] for num in reversed_nums]
      
      return result
  