code: def test_compare_with_sklearn(svd_solver, batch_number):
      X = iris.data
      X_da = da.from_array(X, chunks=(3, -1))
      batch_size = X.shape[0] // batch_number
      ipca = sd.IncrementalPCA(n_components=2, batch_size=batch_size)
      ipca.fit(X)
      ipca_da = IncrementalPCA(
          n_components=2, batch_size=batch_size, svd_solver=svd_solver
      )
      ipca_da.fit(X_da)
      np.testing.assert_allclose(
          flip_vector_signs(ipca.components_, 1),
          flip_vector_signs(ipca_da.components_, 1),
          atol=1e-13,
      )
      np.testing.assert_allclose(
          ipca.explained_variance_,
          ipca_da.explained_variance_,
          atol=1e-13,
      )
      np.testing.assert_allclose(
          ipca.explained_variance_,
          ipca_da.explained_variance_,
          atol=1e-13,
      )
      np.testing.assert_allclose(
          ipca.explained_variance_ratio_,
          ipca_da.explained_variance_ratio_,
          atol=1e-13,
      )
      if svd_solver == "randomized":
          # noise variance in randomized solver is probabilistic.
          assert_almost_equal(
              ipca.noise_variance_, ipca_da.noise_variance_, decimal=1
          )
      else:
          np.testing.assert_allclose(
              ipca.noise_variance_, ipca_da.noise_variance_, atol=1e-13
          )
  
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 1 for calling a global function with example usage: test_compare_with_sklearn(svd_solver, batch_number) without return types