code: def test_encode_categories_in_k_binary_plus_select_vars_automatically(
      df_enc_big,
  ):
      # test case 1: encode all categories into k binary variables, select variables
      # automatically
      encoder = OneHotEncoder(
          top_categories=None, variables=None, drop_last=False
      )
      X = encoder.fit_transform(df_enc_big)
  
      # test init params
      assert encoder.top_categories is None
      assert encoder.variables is None
      assert encoder.drop_last is False
      # 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_A_G": 6,
          "var_B_A": 10,
          "var_B_B": 6,
          "var_B_C": 4,
          "var_B_D": 10,
          "var_B_E": 2,
          "var_B_F": 2,
          "var_B_G": 6,
          "var_C_A": 4,
          "var_C_B": 6,
          "var_C_C": 10,
          "var_C_D": 10,
          "var_C_E": 2,
          "var_C_F": 2,
          "var_C_G": 6,
      }
  
      assert encoder.variables_ == ["var_A", "var_B", "var_C"]
      assert encoder.variables_binary_ == []
      assert encoder.n_features_in_ == 3
      assert encoder.encoder_dict_ == {
          "var_A": ["A", "B", "C", "D", "E", "F", "G"],
          "var_B": ["A", "B", "C", "D", "E", "F", "G"],
          "var_C": ["A", "B", "C", "D", "E", "F", "G"],
      }
      # test transform output
      assert X.sum().to_dict() == transf
      assert "var_A" not 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 1 for calling a global function with example usage: test_encode_categories_in_k_binary_plus_select_vars_automatically(df_enc_big) without return types