Write a function even_numbers_to(n: int) -> list[int] that takes an integer input n (greater than or equal to 2) and returns the list of even integers from 2 up to n. If n is odd, the last integer in the list will be the even number before n There are some mistakes in the code below. Fix them and then test your code against the autograder below.
def even_numbers_to(n: int) -> list[int]:
#create the sequence using range
seq = range(2, 10, 2)
#store the sequence in a list
even_list = list(seq)
#return the list
return(even_list)