code: def test_encode_categories_in_k_minus_1_binary_plus_list_of_variables(
      df_enc_big,
  ):
      # test case 2: encode all categories into k-1 binary variables,
      # pass list of variables
      encoder = OneHotEncoder(
          top_categories=None,
          variables=["var_A", "var_B"],
          drop_last=True,
      )
      X = encoder.fit_transform(df_enc_big)
  
      # test init params
      assert encoder.top_categories is None
      assert encoder.variables == ["var_A", "var_B"]
      assert encoder.drop_last is True
      # test fit attr
      transf = {
          "var_A_A": 6,
          "var_A_B": 10,
          "var_A_C": 4,
          "var_A_D": 10,
          "var_A_E": 2,
          "var_A_F": 2,
          "var_B_A": 10,
          "var_B_B": 6,
          "var_B_C": 4,
          "var_B_D": 10,
          "var_B_E": 2,
          "var_B_F": 2,
      }
  
      assert encoder.variables_ == ["var_A", "var_B"]
      assert encoder.variables_binary_ == []
      assert encoder.n_features_in_ == 3
      assert encoder.encoder_dict_ == {
          "var_A": ["A", "B", "C", "D", "E", "F"],
          "var_B": ["A", "B", "C", "D", "E", "F"],
      }
      # test transform output
      for col in transf.keys():
          assert X[col].sum() == transf[col]
      assert "var_B" not in X.columns
      assert "var_B_G" not in X.columns
      assert "var_C" in X.columns
  
file_path: feature_engine/tests/test_encoding/test_onehot_encoder.py
imports: import pandas
  import pytest
  from sklearn.pipeline import Pipeline
  from feature_engine.encoding import OneHotEncoder
label_desc: Use image node_id 2 for calling a global function with example usage: test_encode_categories_in_k_minus_1_binary_plus_list_of_variables(df_enc_big) without return types