code: def _prepare(self, sup_rows, sup_cols, scale):
      self.sup_rows = sup_rows
      self.sup_cols = sup_cols
      self.scale = scale
  
      n_components = 5
  
      # Fit Prince
      self.dataset = prince.datasets.load_decathlon()
      self.active = self.dataset.copy()
      if self.sup_rows:
          self.active = self.active.query('competition == "Decastar"')
      self.pca = prince.PCA(
          n_components=n_components, rescale_with_std=self.scale
      )
      self.pca.fit(
          self.active,
          supplementary_columns=["rank", "points"]
          if self.sup_cols
          else None,
      )
  
      # scikit-learn
      if self.scale:
          self.sk_pca = pipeline.make_pipeline(
              preprocessing.StandardScaler(),
              decomposition.PCA(n_components=n_components),
          )
      else:
          self.sk_pca = pipeline.make_pipeline(
              decomposition.PCA(n_components=n_components),
          )
      self.sk_pca.fit(self.active[self.pca.feature_names_in_])
  
      # Fit FactoMineR
      robjects.r(
          """
          library('FactoMineR')
  
          data(decathlon)
          decathlon <- subset(decathlon, select = -c(Competition))
          """
      )
      args = f"decathlon, ncp={n_components}, graph=F"
      if not self.scale:
          args += ", scale.unit=F"
      if self.sup_cols:
          if self.sup_rows:
              robjects.r(
                  f"pca = PCA({args}, quanti.sup=c(11, 12), ind.sup=c(14:41))"
              )
          else:
              robjects.r(f"pca = PCA({args}, quanti.sup=c(11, 12))")
      else:
          if self.sup_rows:
              robjects.r(f"pca = PCA({args}, ind.sup=c(14:41))")
          else:
              robjects.r(f"pca = PCA({args})")
  
imports: from __future__ import annotations
  import math
  import numpy
  import pandas
  import pytest
  import rpy2.robjects
  import sklearn.utils.estimator_checks
  import sklearn.utils.validation
  from sklearn import decomposition, pipeline, preprocessing
  import prince
  from tests import load_df_from_R
label_desc: Use image node_id 1 for calling the TestPCA obj's underlying member method code with example usage: obj._prepare(sup_rows, sup_cols, scale) without return types