code: def test_singular_values(setup):
      # Check that the TruncatedSVD output has the correct singular values
  
      # Set the singular values and see what we get back
      rng = np.random.RandomState(0)
      n_samples = 100
      n_features = 110
  
      X = rng.randn(n_samples, n_features)
  
      rpca = TruncatedSVD(
          n_components=3, algorithm="randomized", random_state=rng
      )
      X_rpca = rpca.fit_transform(X)
  
      X_rpca /= mt.sqrt(mt.sum(X_rpca**2.0, axis=0))
      X_rpca[:, 0] *= 3.142
      X_rpca[:, 1] *= 2.718
  
      X_hat_rpca = mt.dot(X_rpca, rpca.components_)
      rpca.fit(X_hat_rpca)
      assert_array_almost_equal(
          rpca.singular_values_.to_numpy(), [3.142, 2.718, 1.0], 14
      )
  
file_path: mars/mars/learn/decomposition/tests/test_truncated_svd.py
imports: import numpy
  import pytest
  import scipy.sparse
  from sklearn.utils import check_random_state
  from sklearn.utils._testing import assert_array_almost_equal, assert_array_less
  from ....None import tensor
  from ..None import TruncatedSVD
label_desc: Use image node_id 7 for calling a global function with example usage: test_singular_values(setup) without return types