Sure! Here's an example of how you can write a Python function to calculate the RMSE:

```
import numpy as np

def RMSE(y_true, y_pred):
    """Calculate the Root Mean Squared Error between y_true and y_pred."""
    mse = np.square(np.subtract(y_true, y_pred)).mean() 
    rmse = np.sqrt(mse)
    return rmse
```

The function takes in two arrays `y_true` and `y_pred`, which are the true and predicted values respectively. It first calculates the mean squared error (MSE), then takes the square root of the MSE to get the RMSE. The `np` module is used to take advantage of NumPy's array operations for faster computation.
Scrivi una funzione per calcolare l'errore quadratico medio (RMSE).