code: def test_reconstruction_x():
      """Tests CP_PLSR factors accurately reconstruct x."""
      x, y, _, _ = _get_standard_synthetic()
      pls = CP_PLSR(N_LATENT)
      pls.fit(x, y)
  
      x_cp = CPTensor((None, pls.X_factors))
      reconstructed_x = x_cp.to_tensor()
  
      assert_allclose(reconstructed_x, x, rtol=0, atol=1e-2)
  
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 10 for calling a global function with example usage: test_reconstruction_x() without return types