code: def test_encoding_method_param(df_enc):
      # defaults
      encoder = DecisionTreeEncoder(regression=False)
      encoder.fit(df_enc, df_enc["target"])
      assert encoder.encoder_[0].encoding_method == "arbitrary"
  
      # ordered encoding
      encoder = DecisionTreeEncoder(
          encoding_method="ordered", regression=False
      )
      encoder.fit(df_enc[["var_A", "var_B"]], df_enc["target"])
      assert encoder.encoder_[0].encoding_method == "ordered"
  
      # incorrect input
      with pytest.raises(ValueError):
          encoder = DecisionTreeEncoder(
              encoding_method="other", regression=False
          )
          encoder.fit(df_enc, 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 1 for calling a global function with example usage: test_encoding_method_param(df_enc) without return types