code: def test_transform_same_factors():
      """Tests transform the original X and Y will give the first factors"""
      X, Y, _, _ = _get_pls_dataset((20, 18, 14, 13), 6, 17)
  
      tpls = CP_PLSR(4)
      tpls.fit(X, Y)
      rord = np.arange(20)
      np.random.shuffle(rord)
      X_scores, Y_scores = tpls.transform(X[rord, :], Y[rord, :])
  
      assert_allclose(X_scores, tpls.X_factors[0][rord, :])
      assert_allclose(Y_scores, tpls.Y_factors[0][rord, :])
  
imports: import numpy
  import pytest
  import tensorly
  from ...testing import assert_allclose
  from ...cp_tensor import CPTensor, cp_normalize, cp_to_tensor
  from ...metrics.factors import congruence_coefficient
  from ...random import random_cp
  from ..cp_plsr import CP_PLSR
label_desc: Use image node_id 15 for calling a global function with example usage: test_transform_same_factors() without return types