code: def test_target_encoder(self):
      np_X = th.create_array(n_rows=100)
      np_X_t = th.create_array(n_rows=50, extras=True)
      np_y = np.random.randn(np_X.shape[0]) > 0.5
      np_y_t = np.random.randn(np_X_t.shape[0]) > 0.5
      X = th.create_dataset(n_rows=100)
      X_t = th.create_dataset(n_rows=50, extras=True)
      y = pd.DataFrame(np_y)
      y_t = pd.DataFrame(np_y_t)
      enc = encoders.TargetEncoder(
          verbose=1, smoothing=2, min_samples_leaf=2
      )
      enc.fit(X, y)
      th.verify_numeric(enc.transform(X_t))
      th.verify_numeric(enc.transform(X_t, y_t))
  
imports: import pandas
  from unittest import TestCase
  import tests.helpers
  import numpy
  from category_encoders.datasets import load_postcodes, load_compass
  import category_encoders
label_desc: Use image node_id 2 for calling the TestTargetEncoder obj's underlying member method code with example usage: obj.test_target_encoder() without return types