Write an algorithm to reverse a matrix in place. Reverse the matrix by reversing both row order and column order, equivalent to a 180-degree rotation, without allocating another matrix. Implement reverse_matrix(matrix), where matrix is a rectangular list of lists of integers; mutate it and return it. For example, [[1, 2], [3, 4]] becomes [[4, 3], [2, 1]].
def reverse_matrix(matrix):