code: def _save_attributes(self):
      self.n_samples_ = self._onedal_estimator.n_samples_
  
      if sklearn_check_version("1.2"):
          self.n_features_in_ = self._onedal_estimator.n_features_in_
          n_features = self.n_features_in_
      elif sklearn_check_version("0.24"):
          self.n_features_ = self._onedal_estimator.n_features_
          self.n_features_in_ = self._onedal_estimator.n_features_in_
          n_features = self.n_features_in_
      else:
          self.n_features_ = self._onedal_estimator.n_features_
          n_features = self.n_features_
      n_sf_min = min(self.n_samples_, n_features)
  
      self.mean_ = self._onedal_estimator.mean_
      self.singular_values_ = self._onedal_estimator.singular_values_
      self.explained_variance_ = (
          self._onedal_estimator.explained_variance_
      )
      self.explained_variance_ratio_ = (
          self._onedal_estimator.explained_variance_ratio_
      )
  
      if self.n_components is None:
          self.n_components_ = self._onedal_estimator.n_components_
      elif self.n_components == "mle":
          if sklearn_check_version("0.23"):
              self.n_components_ = _infer_dimension(
                  self.explained_variance_, self.n_samples_
              )
          else:
              self.n_components_ = _infer_dimension_(
                  self.explained_variance_, self.n_samples_, n_features
              )
      elif 0 < self.n_components < 1.0:
          ratio_cumsum = stable_cumsum(self.explained_variance_ratio_)
          self.n_components_ = (
              np.searchsorted(
                  ratio_cumsum, self.n_components, side="right"
              )
              + 1
          )
      else:
          self.n_components_ = self._onedal_estimator.n_components_
  
      if self.n_components_ < n_sf_min:
          if self.explained_variance_.shape[0] == n_sf_min:
              self.noise_variance_ = self.explained_variance_[
                  self.n_components_ :
              ].mean()
          else:
              self.noise_variance_ = (
                  self._onedal_estimator.noise_variance_
              )
      else:
          self.noise_variance_ = 0.0
  
      self.explained_variance_ = self.explained_variance_[
          : self.n_components_
      ]
      self.explained_variance_ratio_ = self.explained_variance_ratio_[
          : self.n_components_
      ]
      self.components_ = self._onedal_estimator.components_[
          : self.n_components_
      ]
      self.singular_values_ = self.singular_values_[
          : self.n_components_
      ]
  
imports: import numbers
  from math import sqrt
  import numpy
  from scipy.sparse import issparse
  from sklearn.base import BaseEstimator
  from sklearn.utils.extmath import stable_cumsum
  from sklearn.utils.validation import check_array, check_is_fitted
  from daal4py.sklearn._utils import control_n_jobs, run_with_n_jobs, sklearn_check_version
  from onedal.utils import _check_array
  from ..._device_offload import dispatch
  from ..._utils import PatchingConditionsChain, register_hyperparameters
  from sklearn.decomposition import PCA
  from onedal.common.hyperparameters import get_hyperparameters
  from onedal.decomposition import PCA
label_desc: Use image node_id 12 for calling the PCA obj's underlying member method code with example usage: obj._save_attributes() without return types