code: def test_multiple_grouping_columns(
      dataset_with_multiple_grouping, scaling_range
  ):
      (
          X,
          y,
          groups,
          X_with_groups,
          grouper,
      ) = dataset_with_multiple_grouping
  
      trf = MinMaxScaler(scaling_range)
      transformer = GroupedTransformer(trf, groups=grouper)
      transformed = transformer.fit(X_with_groups, y).transform(
          X_with_groups
      )
  
      df_with_groups = pd.concat(
          [
              pd.DataFrame(groups, columns=["A", "B"]),
              pd.DataFrame(transformed),
          ],
          axis=1,
      )
  
      assert np.allclose(
          df_with_groups.groupby(["A", "B"]).min(), scaling_range[0]
      )
  
      # If a group has a single element, it defaults to min, so check wether all maxes are one of the bounds
      maxes = df_with_groups.groupby(["A", "B"]).max()
      assert np.all(
          np.isclose(maxes, scaling_range[1])
          | np.isclose(maxes, scaling_range[0])
          # We have at least some groups larger than 1, so there we should find the max of the range
      ) and np.any(np.isclose(maxes, scaling_range[1]))
  
imports: import itertools
  import numpy
  import pandas
  import pytest
  from sklearn.linear_model import LinearRegression
  from sklearn.preprocessing import MinMaxScaler, StandardScaler
  from sklearn.utils import check_X_y
  from sklego.common import flatten
  from sklego.datasets import load_penguins
  from sklego.meta import GroupedTransformer
  from tests.conftest import general_checks, k_vals, n_vals, np_types, select_tests, transformer_checks
label_desc: Use image node_id 13 for calling a global function with example usage: test_multiple_grouping_columns(dataset_with_multiple_grouping, scaling_range) without return types