<prompt> Kuandika kazi ya mahesabu ya msingi wa makosa ya squared RMSE.  <response>: Here is a Python function that can calculate the root mean squared error RMSE:pythonimport numpy as npdef rmsepredictions, targets: Calculates the root mean square error between two numpy nd-arrays. :param predictions: The predicted values, as a numpy nd-array :param targets: The true values, as a numpy nd-array :returns: The root mean square error RMSE between the predicted and true values ensure both inputs are numpy nd-arrays predictions np.asarraypredictions targets np.asarraytargets calculate the squared differences between predictions and targets square_diff np.squarepredictions - targets calculate the mean of the squared differences mean_square_diff square_diff.mean calculate the square root of the mean squared differences rmse_value np.sqrtmean_square_diff return rmse_value 