code: def test_feature_grouping(drop_groups):
      """Assert that feature groups are replaced for stats."""
      data = pycaret.datasets.get_data("juice")
      pc = pycaret.classification.setup(
          data=data,
          target="STORE",
          group_features={
              "gr1": list(data.columns[:2]),
              "gr2": list(data.columns[3:5]),
          },
          drop_groups=drop_groups,
      )
      X, _ = pc.pipeline.transform(pc.X, pc.y)
      assert "mean(gr1)" in X and "median(gr2)" in X
      if drop_groups:
          assert data.columns[0] not in X
      else:
          assert data.columns[0] in X
  
imports: import io
  import numpy
  import pandas
  import pytest
  from imblearn.over_sampling import ADASYN
  from scipy.sparse import csr_matrix
  from sklearn.decomposition import PCA
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import StandardScaler
  import pycaret.classification
  import pycaret.datasets
  import pycaret.regression
label_desc: Use image node_id 31 for calling a global function with example usage: test_feature_grouping(drop_groups) without return types