code: def test_transformer_with_numerical_and_categorical_variables(df_enc):
      df = pd.DataFrame(
          {
              "var_A": ["A"] * 6 + ["B"] * 10 + ["C"] * 4,
              "var_B": ["A"] * 10 + ["B"] * 6 + ["C"] * 4,
              "var_C": np.linspace(0, 20, num=20),
              "var_D": np.linspace(0, 20, num=20),
              "var_E": ["R"] * 7 + ["S"] * 4 + ["T"] * 9,
              "target": [
                  1,
                  1,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  1,
                  1,
                  0,
                  0,
                  0,
                  0,
                  1,
                  1,
                  0,
                  0,
              ],
          }
      )
      X = df.drop("target", axis=1).copy()
      y = df["target"].copy()
  
      sel = SelectByInformationValue(bins=3)
      sel.fit(df.drop("target", axis=1), df["target"])
      X_tr = sel.fit_transform(X, y)
  
      exp_dict = {
          "var_A": 0.29706307738283366,
          "var_B": 0.29706307738283366,
          "var_C": 0.010625883395914762,
          "var_D": 0.010625883395914762,
          "var_E": 0.024620803988822354,
      }
  
      features_to_drop = ["var_C", "var_D", "var_E"]
      exp_df = X.drop(features_to_drop, axis=1)
  
      for key in exp_dict.keys():
          assert math.isclose(
              exp_dict[key], sel.information_values_[key]
          )
      assert sel.features_to_drop_ == features_to_drop
      assert X_tr.equals(exp_df)
  
file_path: feature_engine/tests/test_selection/test_information_value.py
imports: import math
  import numpy
  import pandas
  import pytest
  from feature_engine.selection import SelectByInformationValue
label_desc: Use image node_id 8 for calling a global function with example usage: test_transformer_with_numerical_and_categorical_variables(df_enc) without return types