docstr: Unit test for apply_preprocessing with ColumnTransformer and sklearn model.
docstr_tok: ["Unit","test","for","apply_preprocessing","with","ColumnTransformer","and","sklearn","model","."]
code: def test_transform_ct_5(self):
      """
      Unit test for apply_preprocessing with ColumnTransformer and sklearn model.
      """
      y = pd.DataFrame(data=[0, 1], columns=["y"])
  
      train = pd.DataFrame(
          {"num1": [0, 1], "num2": [0, 2], "other": [1, 0]}
      )
  
      enc = ColumnTransformer(
          transformers=[
              ("onehot_ce", ce.OneHotEncoder(), ["num1", "num2"]),
              ("onehot_skp", skp.OneHotEncoder(), ["num1", "num2"]),
          ],
          remainder="passthrough",
      )
      enc.fit(train, y)
  
      train_preprocessed = pd.DataFrame(enc.transform(train))
      clf = GradientBoostingClassifier(n_estimators=1).fit(
          train_preprocessed, y
      )
      test = pd.DataFrame(
          {"num1": [0, 1, 1], "num2": [0, 2, 0], "other": [1, 0, 0]}
      )
  
      expected = pd.DataFrame(enc.transform(test), index=test.index)
      result = apply_preprocessing(test, clf, enc)
      assert result.shape == expected.shape
      assert all(expected.index == result.index)
  
imports: import unittest
  import pandas
  import numpy
  import category_encoders
  from sklearn.compose import ColumnTransformer
  import sklearn.preprocessing
  import catboost
  import sklearn
  import lightgbm
  import xgboost
  from shapash.utils.transform import inverse_transform
  from shapash.utils.transform import apply_preprocessing
  from shapash.utils.columntransformer_backend import get_feature_names, get_names, get_list_features_names, get_col_mapping_ct
  from sklearn.ensemble import GradientBoostingClassifier
label_desc: Use image node_id 28 for calling the TestInverseTransformColumnsTransformer obj's underlying member method code with example usage: obj.test_transform_ct_5() without return types