def METHOD_NAME(datatype, name, use_handle):
    if name == "blobs":
        X, y = make_blobs(n_samples=500000, n_features=1000, random_state=0)
    elif name == "random":
        pytest.skip(
            "fails when using random dataset " "used by sklearn for testing"
        )
        shape = 5000, 100
        rng = check_random_state(42)
        X = rng.randint(-100, 20, np.product(shape)).reshape(shape)
    else:
        n, p = 500, 5
        rng = np.random.RandomState(0)
        X = rng.randn(n, p) * 0.1 + np.array([3, 4, 2, 3, 5])
    if name != "blobs":
        sktsvd = skTSVD(n_components=1)
        sktsvd.fit(X)
    handle, stream = get_handle(use_handle)
    cutsvd = cuTSVD(n_components=1, handle=handle)
    cutsvd.fit(X)
    cutsvd.handle.sync()
    if name != "blobs":
        for attr in [
            "singular_values_",
            "components_",
            "explained_variance_ratio_",
        ]:
            with_sign = False if attr in ["components_"] else True
            assert array_equal(
                getattr(cutsvd, attr),
                getattr(sktsvd, attr),
                0.4,
                with_sign=with_sign,
            )