code: def test_attr_classes(df_classification):
      X, y = df_classification
      tr = TargetMeanClassifier(variables="cat_var_A")
      tr.fit(X, y)
      assert tr.classes_.tolist() == [0, 1]
  
      y = pd.Series(
          [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
      )
      tr.fit(X, y)
      assert tr.classes_.tolist() == [1, 2]
  
imports: import numpy
  import pandas
  from feature_engine._prediction.target_mean_classifier import TargetMeanClassifier
label_desc: Use image node_id 1 for calling a global function with example usage: test_attr_classes(df_classification) without return types