code: def test_error_when_regression_is_true_and_target_is_binary(df_enc):
      with pytest.raises(ValueError):
          encoder = DecisionTreeEncoder(regression=True)
          encoder.fit(df_enc[["var_A", "var_B"]], df_enc["target"])
  
file_path: feature_engine/tests/test_encoding/test_decision_tree_encoder.py
imports: import numpy
  import pandas
  import pytest
  from sklearn.exceptions import NotFittedError
  from feature_engine.encoding import DecisionTreeEncoder
label_desc: Use image node_id 10 for calling a global function with example usage: test_error_when_regression_is_true_and_target_is_binary(df_enc) without return types