code: def test_pca_fit_then_transform(
      datatype, input_type, name, use_handle
  ):
      blobs_n_samples = 500000
      if name == "blobs" and pytest.max_gpu_memory < 32:
          if pytest.adapt_stress_test:
              blobs_n_samples = int(
                  blobs_n_samples * pytest.max_gpu_memory / 32
              )
          else:
              pytest.skip(
                  "Insufficient GPU memory for this test."
                  "Re-run with 'CUML_ADAPT_STRESS_TESTS=True'"
              )
  
      if name == "blobs":
          X, y = make_blobs(
              n_samples=blobs_n_samples, n_features=1000, random_state=0
          )
  
      elif name == "iris":
          iris = datasets.load_iris()
          X = iris.data
  
      else:
          X, Y = make_multilabel_classification(
              n_samples=500,
              n_classes=2,
              n_labels=1,
              allow_unlabeled=False,
              random_state=1,
          )
  
      if name != "blobs":
          skpca = skPCA(n_components=2)
          skpca.fit(X)
          Xskpca = skpca.transform(X)
  
      handle, stream = get_handle(use_handle)
      cupca = cuPCA(n_components=2, handle=handle)
  
      cupca.fit(X)
      X_cupca = cupca.transform(X)
      cupca.handle.sync()
  
      if name != "blobs":
          assert array_equal(X_cupca, Xskpca, 1e-3, with_sign=False)
          assert Xskpca.shape[0] == X_cupca.shape[0]
          assert Xskpca.shape[1] == X_cupca.shape[1]
  
file_path: cuml/python/cuml/tests/test_pca.py
imports: from cuml.common.exceptions import NotFittedError
  from sklearn.datasets import make_blobs
  from sklearn.decomposition import PCA
  from sklearn.datasets import make_multilabel_classification
  from sklearn import datasets
  from cuml.testing.utils import get_handle, array_equal, unit_param, quality_param, stress_param
  from cuml import PCA
  import pytest
  from cuml.internals.safe_imports import gpu_only_import
  from cuml.internals.safe_imports import cpu_only_import
label_desc: Use image node_id 3 for calling a global function with example usage: test_pca_fit_then_transform(datatype, input_type, name, use_handle) without return types