def METHOD_NAME(self):
    from pyamg import smoothed_aggregation_solver
    from pyamg.krylov import cg, bicgstab
    np.random.seed(30459128)
    A = poisson((50, 50), format='csr')
    b = np.random.rand(A.shape[0])
    ml = smoothed_aggregation_solver(A)
    # cg halts based on the preconditioner norm
    for accel in ['cg', cg]:
        x = ml.solve(b, maxiter=30, tol=1e-8, accel=accel)
        assert precon_norm(b - A*x, ml) < 1e-8*precon_norm(b, ml)
        residuals = []
        x = ml.solve(b, maxiter=30, tol=1e-8, residuals=residuals,
                     accel=accel)
        assert precon_norm(b - A*x, ml) < 1e-8*precon_norm(b, ml)
        # print residuals
        assert_almost_equal(precon_norm(b - A*x, ml), residuals[-1])
    # cgs and bicgstab use the Euclidean norm
    for accel in ['bicgstab', 'cgs', bicgstab]:
        x = ml.solve(b, maxiter=30, tol=1e-8, accel=accel)
        assert np.linalg.norm(b - A*x) < 1e-8*np.linalg.norm(b)
        residuals = []
        x = ml.solve(b, maxiter=30, tol=1e-8, residuals=residuals,
                     accel=accel)
        assert np.linalg.norm(b - A*x) < 1e-8*np.linalg.norm(b)
        # print residuals
        assert_almost_equal(np.linalg.norm(b - A*x), residuals[-1])