code: def test_refit_stateless(self):
      # test that when the encoder is fitted multiple times no old state is carried
      x = pd.DataFrame(
          [
              ["a", "b", "c"],
              ["a", "b", "c"],
              ["b", "b", "c"],
              ["b", "b", "b"],
              ["b", "b", "b"],
              ["a", "b", "a"],
          ],
          columns=["f1", "f2", "f3"],
      )
      y1 = ["bee", "cat", "dog", "dog", "dog", "dog"]
      y2 = ["bee", "cat", "duck", "duck", "duck", "duck"]
      wrapper = PolynomialWrapper(encoders.TargetEncoder())
      result_first_fit = wrapper.fit_transform(x, y1)
      expected_categories_1 = {
          "cat",
          "dog",
      }  # 'bee' is dropped since first label is always dropped
      expected_categories_2 = {"cat", "duck"}
      self.assertEqual(
          set(
              wrapper.label_encoder.ordinal_encoder.category_mapping[0][
                  "mapping"
              ].index
          ),
          {"bee", "cat", "dog"},
      )
      self.assertEqual(
          set(wrapper.feature_encoders.keys()), expected_categories_1
      )
      result_second_fit = wrapper.fit_transform(x, y2)
      self.assertEqual(
          set(
              wrapper.label_encoder.ordinal_encoder.category_mapping[0][
                  "mapping"
              ].index
          ),
          {"bee", "cat", "duck"},
      )
      self.assertEqual(
          set(wrapper.feature_encoders.keys()), expected_categories_2
      )
  
file_path: category_encoders/tests/test_wrapper.py
imports: import numpy
  import pandas
  from unittest import TestCase
  from sklearn.model_selection import GroupKFold
  import category_encoders
  import tests.helpers
  from category_encoders.wrapper import PolynomialWrapper, NestedCVWrapper
label_desc: Use image node_id 3 for calling the TestMultiClassWrapper obj's underlying member method code with example usage: obj.test_refit_stateless() without return types