code: def test_decomposition_accuracy(n_modes, n_response):
      """Tests CP_PLSR recovers factors in original synthetic data."""
      x, y, x_cp, y_cp = _get_pls_dataset(
          tuple([10] * n_modes), N_LATENT, n_response
      )
      pls = CP_PLSR(N_LATENT)
      pls.fit(x, y)
  
      cp_normalize(x_cp)
  
      for pls_factor, true_factor in zip(pls.X_factors, x_cp.factors):
          assert (
              congruence_coefficient(pls_factor, true_factor)[0] > 0.85
          )
  
      assert (
          congruence_coefficient(pls.Y_factors[1], y_cp.factors[1])[0]
          > 0.85
      )
  
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 9 for calling a global function with example usage: test_decomposition_accuracy(n_modes, n_response) without return types