code: def test_calculation_distinct_value_categorical():
      """Test the calculation of the quantiles using distinct values when reference
      variable is categorical."""
      df = pd.DataFrame(
          {
              "A": [it for it in range(0, 30)],
              "C": ["A", "B", "C", "D", "D", "D"] * 5,
          }
      )
  
      test = DropHighPSIFeatures(
          split_col="C", split_frac=0.5, split_distinct=False
      )
  
      test.fit_transform(df)
      assert test.cut_off_ == "C"
  
      test = DropHighPSIFeatures(
          split_col="C", split_frac=0.5, split_distinct=True
      )
      test.fit_transform(df)
      assert test.cut_off_ == "B"
  
      df = pd.DataFrame(
          {
              "A": [it for it in range(0, 30)],
              "C": ["A", "A", "A", "B", "C", "D"] * 5,
          }
      )
  
      test = DropHighPSIFeatures(
          split_col="C", split_frac=0.5, split_distinct=False
      )
  
      test.fit_transform(df)
      assert test.cut_off_ == "A"
  
      test = DropHighPSIFeatures(
          split_col="C", split_frac=0.5, split_distinct=True
      )
      test.fit_transform(df)
      assert test.cut_off_ == "B"
  
imports: from datetime import date
  import math
  import numpy
  import pandas
  import pytest
  from sklearn.datasets import make_classification
  from feature_engine.selection import DropHighPSIFeatures
label_desc: Use image node_id 15 for calling a global function with example usage: test_calculation_distinct_value_categorical() without return types