code: def test_factor_normality():
      """Tests components have norm of 1 across factors."""
      x, y, _, _ = _get_standard_synthetic()
      pls = CP_PLSR(n_components=N_LATENT)
      pls.fit(x, y)
  
      for x_factor in pls.X_factors[1:]:
          assert_allclose(tl.norm(x_factor, axis=0), 1, rtol=1e-6)
  
      for y_factor in pls.Y_factors[1:]:
          assert_allclose(tl.norm(y_factor, axis=0), 1, rtol=1e-6)
  
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 4 for calling a global function with example usage: test_factor_normality() without return types