def METHOD_NAME(operator_with_arrays_and_products):
    _, _, v, _, product, _ = operator_with_arrays_and_products
    for ind in valid_inds(v):
        for rtol, atol in ((1e-5, 1e-8), (1e-10, 1e-12), (0., 1e-8), (1e-5, 1e-8), (1e-12, 0.)):
            r = almost_equal(v[ind], v[ind], product=product)
            assert isinstance(r, np.ndarray)
            assert r.shape == (v.len_ind(ind),)
            assert np.all(r)
            if v.len_ind(ind) == 0 or np.max(v[ind].sup_norm() == 0):
                continue
            c = v.copy()
            c.scal(atol * (1 - 1e-10) / (np.max((v[ind]).norm(product))))
            assert np.all(almost_equal(c[ind], c.zeros(v.len_ind(ind)), atol=atol, rtol=rtol, product=product))
            if atol > 0:
                c = v.copy()
                c.scal(2. * atol / (np.max((v[ind]).norm(product))))
                assert not np.all(almost_equal(c[ind], c.zeros(v.len_ind(ind)), atol=atol, rtol=rtol, product=product))
            c = v.copy()
            c.scal(1. + rtol * 0.9)
            assert np.all(almost_equal(c[ind], v[ind], atol=atol, rtol=rtol, product=product))
            if rtol > 0:
                c = v.copy()
                c.scal(2. + rtol * 1.1)
                assert not np.all(almost_equal(c[ind], v[ind], atol=atol, rtol=rtol, product=product))
            c = v.copy()
            c.scal(1. + atol * 0.9 / np.max(np.max((v[ind]).norm(product))))
            assert np.all(almost_equal(c[ind], v[ind], atol=atol, rtol=rtol, product=product))
            if atol > 0 or rtol > 0:
                c = v.copy()
                c.scal(1 + rtol * 1.1 + atol * 1.1 / np.max(np.max((v[ind]).norm(product))))
                assert not np.all(almost_equal(c[ind], v[ind], atol=atol, rtol=rtol, product=product))