code: def test_single_categorical(self, categorical_data):
      df = categorical_data.copy(deep=True)
      ground_truth = np.array(
          [
              [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
              [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1],
              [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
              [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2],
              [2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1],
              [2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 1],
              [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
          ]
      )  # ground truth is generated by manually use DecionTree to extract thresholds
  
      dt_single = DecisionTreeSupervisedDiscretiserMethod(
          tree_params={"max_depth": 2},
          mode="single",
      )
      tree_discretiser = dt_single.fit(
          feat_names=["petal width (cm)"],
          dataframe=df,
          target_continuous=False,
          target="target",
      )
      discretiser_output = tree_discretiser.transform(
          df[["petal width (cm)"]]
      ).values
      assert (ground_truth == discretiser_output.reshape(-1, 15)).all()
  
file_path: causalnex/tests/discretiser/test_decision_tree.py
imports: import numpy
  import pytest
  from causalnex.discretiser.discretiser_strategy import DecisionTreeSupervisedDiscretiserMethod
label_desc: Use image node_id 2 for calling the TestDecisionTree obj's underlying member method code with example usage: obj.test_single_categorical(categorical_data) without return types