Implement a function that rotates a given 2D image by 90 degrees clockwise.
The image is represented as an n x n matrix of values. Modify the matrix in place and return it after rotation.
Function: def rotate_image(image):
The rotated matrix must place the original top-left value at the top-right position. The input contains at least one row, and every row has exactly n elements.
def rotate_image(image):