def METHOD_NAME(n_modes, n_response):
    """Tests transform() returns first X_factor--relationship between first
    tensor mode and components.
    """
    x, y, _, _ = _get_pls_dataset(tuple([10] * n_modes), N_LATENT, n_response)
    pls = CP_PLSR(N_LATENT)
    pls.fit(x, y)
    transformed = pls.transform(x)
    assert_allclose(transformed, pls.X_factors[0])