code: def test_error_when_regression_is_false_and_target_is_continuous(
      df_discretise,
  ):
      np.random.seed(42)
      mu, sigma = 0, 3
      y = np.random.normal(mu, sigma, len(df_discretise))
      with pytest.raises(ValueError):
          transformer = DecisionTreeDiscretiser(regression=False)
          transformer.fit(df_discretise[["var_A", "var_B"]], y)
  
file_path: feature_engine/tests/test_discretisation/test_decision_tree_discretiser.py
imports: import numpy
  import pandas
  import pytest
  from sklearn.exceptions import NotFittedError
  from feature_engine.discretisation import DecisionTreeDiscretiser, EqualWidthDiscretiser
label_desc: Use image node_id 8 for calling a global function with example usage: test_error_when_regression_is_false_and_target_is_continuous(df_discretise) without return types