code: def test_logratio_and_automaticcally_select_variables(df_enc):
      # test case 2: automatically select variables, log_ratio
      encoder = PRatioEncoder(
          encoding_method="log_ratio", variables=None
      )
      encoder.fit(df_enc[["var_A", "var_B"]], df_enc["target"])
      X = encoder.transform(df_enc[["var_A", "var_B"]])
  
      # transformed dataframe
      transf_df = df_enc.copy()
      transf_df["var_A"] = [
          -0.6931471805599454,
          -0.6931471805599454,
          -0.6931471805599454,
          -0.6931471805599454,
          -0.6931471805599454,
          -0.6931471805599454,
          -1.3862943611198906,
          -1.3862943611198906,
          -1.3862943611198906,
          -1.3862943611198906,
          -1.3862943611198906,
          -1.3862943611198906,
          -1.3862943611198906,
          -1.3862943611198906,
          -1.3862943611198906,
          -1.3862943611198906,
          0.0,
          0.0,
          0.0,
          0.0,
      ]
      transf_df["var_B"] = [
          -1.3862943611198906,
          -1.3862943611198906,
          -1.3862943611198906,
          -1.3862943611198906,
          -1.3862943611198906,
          -1.3862943611198906,
          -1.3862943611198906,
          -1.3862943611198906,
          -1.3862943611198906,
          -1.3862943611198906,
          -0.6931471805599454,
          -0.6931471805599454,
          -0.6931471805599454,
          -0.6931471805599454,
          -0.6931471805599454,
          -0.6931471805599454,
          0.0,
          0.0,
          0.0,
          0.0,
      ]
  
      # init params
      assert encoder.encoding_method == "log_ratio"
      assert encoder.variables is None
      # fit params
      assert encoder.variables_ == ["var_A", "var_B"]
      assert encoder.encoder_dict_ == {
          "var_A": {
              "A": -0.6931471805599454,
              "B": -1.3862943611198906,
              "C": 0.0,
          },
          "var_B": {
              "A": -1.3862943611198906,
              "B": -0.6931471805599454,
              "C": 0.0,
          },
      }
      assert encoder.n_features_in_ == 2
      # transform params
      pd.testing.assert_frame_equal(X, transf_df[["var_A", "var_B"]])
  
      # test error raise
      with pytest.raises(ValueError):
          PRatioEncoder(encoding_method="other")
  
file_path: feature_engine/tests/test_encoding/test_probability_ratio_encoder.py
imports: import pandas
  import pytest
  from feature_engine.encoding import PRatioEncoder
label_desc: Use image node_id 2 for calling a global function with example usage: test_logratio_and_automaticcally_select_variables(df_enc) without return types