code: def test_encode_1_variable_with_counts(df_enc):
      # test case 1: 1 variable, counts
      encoder = CountFrequencyEncoder(
          encoding_method="count", variables=["var_A"]
      )
      X = encoder.fit_transform(df_enc)
  
      # expected result
      transf_df = df_enc.copy()
      transf_df["var_A"] = [
          6,
          6,
          6,
          6,
          6,
          6,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          10,
          4,
          4,
          4,
          4,
      ]
  
      # init params
      assert encoder.encoding_method == "count"
      assert encoder.variables == ["var_A"]
      # fit params
      assert encoder.variables_ == ["var_A"]
      assert encoder.encoder_dict_ == {
          "var_A": {"A": 6, "B": 10, "C": 4}
      }
      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 1 for calling a global function with example usage: test_encode_1_variable_with_counts(df_enc) without return types