code: def _prepare(self, sup_rows, sup_cols):
      self.sup_rows = sup_rows
      self.sup_cols = sup_cols
  
      n_components = 5
  
      # Fit Prince
      self.dataset = prince.datasets.load_burgundy_wines()
      active = self.dataset.copy()
      # if self.sup_rows:
      #     active = active.drop("Île-de-France")
      # if self.sup_cols:
      #     active = active.drop(columns=["Abstention", "Blank"])
      self.groups = (
          self.dataset.columns.levels[0].drop("Oak type").tolist()
      )
      self.mfa = prince.MFA(n_components=n_components)
      self.mfa.fit(active, groups=self.groups)
  
      # Fit FactoMineR
      R("library('FactoMineR')")
      with tempfile.NamedTemporaryFile() as fp:
          dataset = self.dataset.copy()
          dataset.columns = [
              " ".join(parts) for parts in dataset.columns
          ]
          dataset.to_csv(fp, index=False)
          R(f"dataset <- read.csv('{fp.name}')")
          R("dataset <- dataset[,-1]")
          R("mfa <- MFA(dataset, group=c(3, 4, 3), graph=F)")
  
file_path: prince/tests/test_mfa.py
imports: from __future__ import annotations
  import math
  import tempfile
  import numpy
  import pytest
  import rpy2.robjects
  import sklearn.utils.estimator_checks
  import sklearn.utils.validation
  from rpy2.robjects import r
  import prince
  from tests import load_df_from_R
label_desc: Use image node_id 1 for calling the TestMFA obj's underlying member method code with example usage: obj._prepare(sup_rows, sup_cols) without return types