input: Write a python function to sort a 2D numpy array in ascending order and reshape it back to its original dimensions.
  assert np.array_equal(sort_and_reshape(np.array([[8, 2, 6, 7, 4], [7, 9, 5, 4, 6], [2, 3, 7, 1, 4], [5, 8, 4, 9, 6], [4, 7, 8, 2, 1]])), np.array([[1, 1, 2, 2, 2], [3, 4, 4, 4, 4], [5, 5, 6, 6, 6], [7, 7, 7, 8, 8], [8, 9, 9, 9, 9]]))
  assert np.array_equal(sort_and_reshape(np.array([[5, 2], [3, 1]])), np.array([[1, 2], [3, 5]]))
  assert np.array_equal(sort_and_reshape(np.array([[10, 20, 30], [40, 50, 60], [70, 80, 90]])), np.array([[10, 20, 30], [40, 50, 60], [70, 80, 90]]))
output: def sort_and_reshape(arr):
      # Flatten the array
      flat_arr = arr.flatten()
      # Sort the flattened array
      sorted_arr = np.sort(flat_arr)
      # Reshape it back to the original dimensions
      reshaped_arr = sorted_arr.reshape(arr.shape)
      return reshaped_arr