code: def test_variables_cast_as_category(df_enc_category_dtypes):
      df = df_enc_category_dtypes.copy()
      encoder = OrdinalEncoder(
          encoding_method="ordered", variables=["var_A"]
      )
      encoder.fit(df[["var_A", "var_B"]], df["target"])
      X = encoder.transform(df[["var_A", "var_B"]])
  
      # expected output
      transf_df = df.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 transform output
      pd.testing.assert_frame_equal(
          X, transf_df[["var_A", "var_B"]], check_dtype=False
      )
      assert X["var_A"].dtypes == int
  
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 10 for calling a global function with example usage: test_variables_cast_as_category(df_enc_category_dtypes) without return types