code: def test_basic(algorithm):
      a = dd.TruncatedSVD(random_state=0, algorithm=algorithm)
      b = sd.TruncatedSVD(random_state=0)
      b.fit(Xdense)
      a.fit(dXdense)
  
      np.testing.assert_allclose(
          flip_vector_signs(a.components_, axis=1),
          flip_vector_signs(b.components_, axis=1),
          atol=1e-3,
      )
      assert_estimator_equal(
          a,
          b,
          exclude=["components_", "explained_variance_"],
          atol=1e-3,
      )
      assert a.explained_variance_.shape == b.explained_variance_.shape
      np.testing.assert_allclose(
          a.explained_variance_, b.explained_variance_, rtol=0.01
      )
  
file_path: dask-ml/tests/test_svd.py
imports: import dask.array
  import numpy
  import pytest
  import scipy.sparse
  from numpy.testing import assert_array_almost_equal
  from sklearn import decomposition
  from sklearn.utils import check_random_state
  from dask_ml import decomposition
  from dask_ml.utils import assert_estimator_equal, flip_vector_signs
label_desc: Use image node_id 1 for calling a global function with example usage: test_basic(algorithm) without return types