code: def test_explained_variances(svd_solver):
      # Test that PCA and IncrementalPCA calculations match
      X = datasets.make_low_rank_matrix(
          1000,
          100,
          tail_strength=0.0,
          effective_rank=10,
          random_state=1999,
      )
      X = da.from_array(X, chunks=[400, -1])
      prec = 3
      n_samples, n_features = X.shape
      for nc in [None, 99]:
          pca = PCA(n_components=nc, svd_solver=svd_solver).fit(
              X.compute()
          )
          ipca = IncrementalPCA(
              n_components=nc, batch_size=100, svd_solver=svd_solver
          ).fit(X)
          assert_almost_equal(
              pca.explained_variance_,
              ipca.explained_variance_,
              decimal=prec,
          )
          assert_almost_equal(
              pca.explained_variance_ratio_,
              ipca.explained_variance_ratio_,
              decimal=prec,
          )
          assert_almost_equal(
              pca.noise_variance_, ipca.noise_variance_, decimal=prec
          )
  
imports: import numpy
  import pytest
  from dask import array
  from sklearn import datasets, decomposition
  from sklearn.decomposition import PCA
  from dask_ml.decomposition import IncrementalPCA
  from dask_ml.utils import flip_vector_signs
label_desc: Use image node_id 15 for calling a global function with example usage: test_explained_variances(svd_solver) without return types