code: def test_error_handling(self):
      for encoder_name in encoders.__all__:
          with self.subTest(encoder_name=encoder_name):
              # we exclude some columns
              X = th.create_dataset(n_rows=100)
              X = X.drop(["unique_str", "none"], axis=1)
              X_t = th.create_dataset(n_rows=50, extras=True)
              X_t = X_t.drop(["unique_str", "none"], axis=1)
  
              # illegal state, we have to first train the encoder...
              enc = getattr(encoders, encoder_name)()
              with self.assertRaises(ValueError):
                  enc.transform(X)
  
              # wrong count of attributes
              enc = getattr(encoders, encoder_name)()
              enc.fit(X, y)
              with self.assertRaises(ValueError):
                  enc.transform(X_t.iloc[:, 0:3])
  
              # no cols
              enc = getattr(encoders, encoder_name)(cols=[])
              enc.fit(X, y)
              self.assertTrue(enc.transform(X_t).equals(X_t))
  
imports: import warnings
  from datetime import timedelta
  import numpy
  from numpy.testing import assert_array_equal
  import pandas
  import sklearn
  import tests.helpers
  from sklearn.utils.estimator_checks import check_transformer_general, check_transformers_unfitted, check_n_features_in
  from sklearn.compose import ColumnTransformer
  from unittest import TestCase
  from copy import deepcopy
  import category_encoders
label_desc: Use image node_id 5 for calling the TestEncoders obj's underlying member method code with example usage: obj.test_error_handling() without return types