code: def test_ordered_encoding_1_variable(df_enc):
      # test case 1: 1 variable, ordered encoding
      encoder = OrdinalEncoder(
          encoding_method="ordered", variables=["var_A"]
      )
      encoder.fit(df_enc[["var_A", "var_B"]], df_enc["target"])
      X = encoder.transform(df_enc[["var_A", "var_B"]])
  
      # expected output
      transf_df = df_enc.copy()
      transf_df["var_A"] = [
          1,
          1,
          1,
          1,
          1,
          1,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          2,
          2,
          2,
          2,
      ]
  
      # test init params
      assert encoder.encoding_method == "ordered"
      assert encoder.variables == ["var_A"]
      # test fit attr
      assert encoder.variables_ == ["var_A"]
      assert encoder.encoder_dict_ == {
          "var_A": {"A": 1, "B": 0, "C": 2}
      }
      assert encoder.n_features_in_ == 2
      # test transform output
      pd.testing.assert_frame_equal(X, transf_df[["var_A", "var_B"]])
  
file_path: feature_engine/tests/test_encoding/test_ordinal_encoder.py
imports: import numpy
  import pandas
  import pytest
  from feature_engine.encoding import OrdinalEncoder
label_desc: Use image node_id 1 for calling a global function with example usage: test_ordered_encoding_1_variable(df_enc) without return types