def mse(y_true: Union[np.array, list],
        y_predicted: Union[np.array, list],
        *args,
        **kwargs) -> float:
    """
    Calculates mean squared error.
    Args:
        y_true: list of true values
        y_predicted: list of predicted values
    Returns:
        float: Mean squared error
    """
    for value in [y_true, y_predicted]:
        assert (np.isfinite(value).all())
    return mean_squared_error(y_true, y_predicted, *args, **kwargs)

    Calculates mean squared error.
    Args:
        y_true: list of true values
        y_predicted: list of predicted values
    Returns:
        float: Mean squared error
    
deeppavlov/metrics/mse.py