Create a function that returns the right diagonal of a matrix if the sum of the right diagonal is greater than or equal to the sum of the left diagonal, else returns the left diagonal.
compare_diagonals([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) ➞ [3, 5, 7]
The matrix will be a square matrix of any order.