Describe how you would write a program to find the diagonal of a matrix. Given a non-empty square matrix, implement get_diagonal(matrix) to return a list containing the elements from the top-left to the bottom-right where the row and column indices match. For example, [[1, 2], [3, 4]] returns [1, 4], while [[5]] returns [5].
def get_diagonal(matrix):