def METHOD_NAME(n_times, test_data):
    rmse = RootMeanSquaredError()
    y_pred, y, batch_size = test_data
    rmse.reset()
    if batch_size > 1:
        n_iters = y.shape[0] // batch_size + 1
        for i in range(n_iters):
            idx = i * batch_size
            rmse.update((y_pred[idx : idx + batch_size], y[idx : idx + batch_size]))
    else:
        rmse.update((y_pred, y))
    np_y = y.numpy().ravel()
    np_y_pred = y_pred.numpy().ravel()
    np_res = np.sqrt(np.power((np_y - np_y_pred), 2.0).sum() / np_y.shape[0])
    res = rmse.compute()
    assert isinstance(res, float)
    assert pytest.approx(res) == np_res