code: def test_catBoost(self):
      X = pd.DataFrame({"col1": ["A", "B", "B", "C", "A"]})
      y = pd.Series([1, 0, 1, 0, 1])
      enc = encoders.CatBoostEncoder()
      obtained = enc.fit_transform(X, y)
      self.assertEqual(
          list(obtained["col1"]),
          [0.6, 0.6, 0.6 / 2, 0.6, 1.6 / 2],
          "The nominator is incremented by the prior. The denominator by 1.",
      )
  
      # For testing set, use statistics calculated on all the training data.
      # See: CatBoost: unbiased boosting with categorical features, page 4.
      X_t = pd.DataFrame({"col1": ["B", "B", "A"]})
      obtained = enc.transform(X_t)
      self.assertEqual(
          list(obtained["col1"]), [1.6 / 3, 1.6 / 3, 2.6 / 3]
      )
  
file_path: category_encoders/tests/test_cat_boost.py
imports: import pandas
  import numpy
  from unittest import TestCase
  import category_encoders
label_desc: Use image node_id 1 for calling the TestCatBoostEncoder obj's underlying member method code with example usage: obj.test_catBoost() without return types