input: def sort_and_replace(arr):
      """
      Given a list of integers, sort the integers that are between 1 and 9 inclusive,
      reverse the sorted list, and then replace each digit with its corresponding name from
      "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine".
  
      For instance:
        arr = [3, 1, 5, 7, 9, 2, 3]   
              -> sort arr -> [1, 2, 3, 3, 5, 7, 9] 
              -> reverse arr -> [9, 7, 5, 3, 3, 2, 1]
        return ["Nine", "Seven", "Five", "Three", "Three", "Two", "One"]
      
        If the list is empty, return an empty list:
        arr = []
        return []
      
        If the list contains any invalid number, ignore it:
        arr = [4, -2, 100] 
              -> sort arr -> [-2, 4, 100]
              -> reverse arr -> [100, 4, -2]
        return = ['Four']
      """
output:     digit_names = ["One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"]
      valid_digits = [n for n in arr if 1 <= n <= 9]
      if not valid_digits:
          return []
      
      valid_digits.sort(reverse=True)
      
      return [digit_names[n-1] for n in valid_digits]