code: def test_automatically_select_variables_encode_with_frequency(df_enc):
      # test case 2: automatically select variables, frequency
      encoder = CountFrequencyEncoder(
          encoding_method="frequency", variables=None
      )
      X = encoder.fit_transform(df_enc)
  
      # expected output
      transf_df = df_enc.copy()
      transf_df["var_A"] = [
          0.3,
          0.3,
          0.3,
          0.3,
          0.3,
          0.3,
          0.5,
          0.5,
          0.5,
          0.5,
          0.5,
          0.5,
          0.5,
          0.5,
          0.5,
          0.5,
          0.2,
          0.2,
          0.2,
          0.2,
      ]
      transf_df["var_B"] = [
          0.5,
          0.5,
          0.5,
          0.5,
          0.5,
          0.5,
          0.5,
          0.5,
          0.5,
          0.5,
          0.3,
          0.3,
          0.3,
          0.3,
          0.3,
          0.3,
          0.2,
          0.2,
          0.2,
          0.2,
      ]
  
      # init params
      assert encoder.encoding_method == "frequency"
      assert encoder.variables is None
      # fit params
      assert encoder.variables_ == ["var_A", "var_B"]
      assert encoder.encoder_dict_ == {
          "var_A": {"A": 0.3, "B": 0.5, "C": 0.2},
          "var_B": {"A": 0.5, "B": 0.3, "C": 0.2},
      }
      assert encoder.n_features_in_ == 3
      # transform params
      pd.testing.assert_frame_equal(X, transf_df)
  
imports: import warnings
  import numpy
  import pandas
  import pytest
  from numpy import nan
  from feature_engine.encoding import CountFrequencyEncoder
label_desc: Use image node_id 2 for calling a global function with example usage: test_automatically_select_variables_encode_with_frequency(df_enc) without return types