code: def test_encode_numerical_variables(df_enc_numeric):
      encoder = OneHotEncoder(
          top_categories=None,
          variables=None,
          drop_last=False,
          ignore_format=True,
      )
  
      X = encoder.fit_transform(df_enc_numeric[["var_A", "var_B"]])
  
      # test fit attr
      transf = {
          "var_A_1": [
              1,
              1,
              1,
              1,
              1,
              1,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
          ],
          "var_A_2": [
              0,
              0,
              0,
              0,
              0,
              0,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              0,
              0,
              0,
              0,
          ],
          "var_A_3": [
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              1,
              1,
              1,
              1,
          ],
          "var_B_1": [
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              1,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
          ],
          "var_B_2": [
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              1,
              1,
              1,
              1,
              1,
              1,
              0,
              0,
              0,
              0,
          ],
          "var_B_3": [
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              1,
              1,
              1,
              1,
          ],
      }
  
      transf = pd.DataFrame(transf).astype("int32")
      X = pd.DataFrame(X).astype("int32")
  
      assert encoder.variables_ == ["var_A", "var_B"]
      assert encoder.variables_binary_ == []
      assert encoder.n_features_in_ == 2
      assert encoder.encoder_dict_ == {
          "var_A": [1, 2, 3],
          "var_B": [1, 2, 3],
      }
      # test transform output
      pd.testing.assert_frame_equal(X, transf)
  
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 7 for calling a global function with example usage: test_encode_numerical_variables(df_enc_numeric) without return types