code: def test_pca_fit(nrows, ncols, n_parts, input_type, client):
      from cuml.dask.decomposition import PCA as daskPCA
      from sklearn.decomposition import PCA
  
      from cuml.dask.datasets import make_blobs
  
      X, _ = make_blobs(
          n_samples=nrows,
          n_features=ncols,
          centers=1,
          n_parts=n_parts,
          cluster_std=0.5,
          random_state=10,
          dtype=np.float32,
      )
  
      if input_type == "dataframe":
          X_train = to_dask_cudf(X)
          X_cpu = X_train.compute().to_pandas().values
      elif input_type == "array":
          X_train = X
          X_cpu = cp.asnumpy(X_train.compute())
  
      try:
          cupca = daskPCA(n_components=5, whiten=True)
          cupca.fit(X_train)
      except Exception as e:
          print(str(e))
  
      skpca = PCA(n_components=5, whiten=True, svd_solver="full")
      skpca.fit(X_cpu)
  
      from cuml.testing.utils import array_equal
  
      all_attr = [
          "singular_values_",
          "components_",
          "explained_variance_",
          "explained_variance_ratio_",
      ]
  
      for attr in all_attr:
          with_sign = False if attr in ["components_"] else True
          cuml_res = getattr(cupca, attr)
          if type(cuml_res) == np.ndarray:
              cuml_res = cuml_res.to_numpy()
          skl_res = getattr(skpca, attr)
          assert array_equal(
              cuml_res, skl_res, 1e-1, with_sign=with_sign
          )
  
imports: from cuml.dask.common.dask_arr_utils import to_dask_cudf
  from cuml.internals.safe_imports import gpu_only_import
  import pytest
  from cuml.internals.safe_imports import cpu_only_import
label_desc: Use image node_id 1 for calling a global function with example usage: test_pca_fit(nrows, ncols, n_parts, input_type, client) without return types