code: def test_attributes(setup):
      for n_components in (10, 25, 41):
          tsvd = TruncatedSVD(n_components).fit(X)
          assert tsvd.n_components == n_components
          assert tsvd.components_.shape == (n_components, n_features)
  
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 1 for calling a global function with example usage: test_attributes(setup) without return types