code: def test_svd_compression_gives_orthogonal_scores():
      """Compressed tensor slices should have orthogonal rows"""
      rng = tl.check_random_state(1234)
      tensor_slices = [
          tl.tensor(rng.standard_normal((25, 10)), dtype=tl.float64),
          tl.tensor(rng.standard_normal((25, 10)), dtype=tl.float64),
      ]
      compressed_slices, _loadings = svd_compress_tensor_slices(
          tensor_slices
      )
      for compressed_slice in compressed_slices:
          gramian = tl.to_numpy(
              tl.matmul(
                  compressed_slice, tl.transpose(compressed_slice)
              )
          )
          diagonal_entries = np.diag(gramian)
  
          np.testing.assert_allclose(
              np.diag(diagonal_entries), gramian, atol=1e-10
          )
  
file_path: tensorly/tensorly/tests/test_preprocessing.py
imports: import pytest
  from pytest import approx
  import numpy
  import tensorly
  from ..parafac2_tensor import parafac2_to_slices
  from ..random import random_parafac2
  from ..testing import assert_allclose
  from ..decomposition._parafac2 import parafac2, _parafac2_reconstruction_error
  from ..preprocessing import svd_compress_tensor_slices, svd_decompress_parafac2_tensor
label_desc: Use image node_id 5 for calling a global function with example usage: test_svd_compression_gives_orthogonal_scores() without return types