code: def compute(data, nComponents):
      # configure a PCA object and perform PCA
      pca_algo = d4p.pca(
          isDeterministic=True,
          fptype="float",
          resultsToCompute="mean|variance|eigenvalue",
      )
      pca_res = pca_algo.compute(data)
      # Apply transform with whitening because means and eigenvalues are provided
      pcatrans_algo = d4p.pca_transform(
          fptype="float", nComponents=nComponents
      )
      return pcatrans_algo.compute(
          data, pca_res.eigenvectors, pca_res.dataForTransform
      )
  
imports: import os
  import numpy
  import daal4py
  from daal4py.oneapi import sycl_buffer
label_desc: Use image node_id 1 for calling a global function with example usage: compute(data, nComponents) and returns: pcatrans_algo