code: def _prepare(self, sup_rows, sup_cols):
      self.sup_rows = sup_rows
      self.sup_cols = sup_cols
  
      n_components = 5
      n_active_rows = 1_000
  
      # Fit Prince
      self.dataset = prince.datasets.load_hearthstone_cards()
      active = self.dataset.copy()
      if self.sup_rows:
          active = active[:n_active_rows]
      if self.sup_cols:
          active = active.drop(columns=["type_or_school"])
      self.ca = prince.MCA(n_components=n_components, engine="scipy")
      self.ca.fit(active)
  
      # Fit FactoMineR
      R("library('FactoMineR')")
      with tempfile.NamedTemporaryFile() as fp:
          self.dataset.to_csv(fp)
          R(f"dataset <- read.csv('{fp.name}')[,-1]")
  
      args = f"dataset, ncp={n_components}, graph=F"
      if self.sup_cols:
          if self.sup_rows:
              R(
                  f"ca <- MCA({args}, quali.sup=c(4), ind.sup=c({n_active_rows + 1}:nrow(dataset)))"
              )
          else:
              R(f"ca <- MCA({args}, quali.sup=c(4))")
      else:
          if self.sup_rows:
              R(
                  f"ca <- MCA({args}, ind.sup=c({n_active_rows + 1}:nrow(dataset)))"
              )
          else:
              R(f"ca <- MCA({args})")
  
file_path: prince/tests/test_mca.py
imports: from __future__ import annotations
  import tempfile
  import numpy
  import pandas
  import pytest
  from rpy2.robjects import r
  import prince
  from tests import load_df_from_R
  from tests.test_ca import TestCA
label_desc: Use image node_id 1 for calling the TestMCA obj's underlying member method code with example usage: obj._prepare(sup_rows, sup_cols) without return types