code: def test_transformer_with_equal_frequency_discretization(df_enc):
      df = pd.DataFrame(
          {
              "var_C": np.linspace(0, 20, num=20),
              "var_D": np.linspace(0, 20, num=20),
              "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, strategy="equal_frequency")
      sel.fit(df.drop("target", axis=1), df["target"])
      sel.fit(X, y)
  
      exp_dict = {
          "var_C": 0.010625883395914762,
          "var_D": 0.010625883395914762,
      }
  
      for key in exp_dict.keys():
          assert math.isclose(
              exp_dict[key], sel.information_values_[key]
          )
  
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 9 for calling a global function with example usage: test_transformer_with_equal_frequency_discretization(df_enc) without return types