code: def test_partial_fit(
      nrows, ncols, n_components, density, batch_size_divider, whiten
  ):
      X, _ = make_blobs(
          n_samples=nrows, n_features=ncols, random_state=10
      )
  
      cu_ipca = cuIPCA(n_components=n_components, whiten=whiten)
  
      sample_size = int(nrows / batch_size_divider)
      for i in range(0, nrows, sample_size):
          cu_ipca.partial_fit(X[i : i + sample_size].copy())
  
      cu_t = cu_ipca.transform(X)
      cu_inv = cu_ipca.inverse_transform(cu_t)
  
      sk_ipca = skIPCA(n_components=n_components, whiten=whiten)
  
      X = cp.asnumpy(X)
  
      for i in range(0, nrows, sample_size):
          sk_ipca.partial_fit(X[i : i + sample_size].copy())
  
      sk_t = sk_ipca.transform(X)
      sk_inv = sk_ipca.inverse_transform(sk_t)
  
      assert array_equal(cu_inv, sk_inv, 5e-5, with_sign=True)
  
file_path: cuml/python/cuml/tests/test_incremental_pca.py
imports: from cuml.common.exceptions import NotFittedError
  from cuml.testing.utils import array_equal
  from cuml.decomposition.incremental_pca import _svd_flip
  from cuml.decomposition import IncrementalPCA
  from cuml.datasets import make_blobs
  from sklearn.decomposition import IncrementalPCA
  import pytest
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 2 for calling a global function with example usage: test_partial_fit(nrows, ncols, n_components, density, batch_size_divider, whiten) without return types