code: def test_LabelBinarizer(self):
      arr = np.array([1, 2, 3, 2])
      s = pdml.ModelSeries(arr, index=["a", "b", "c", "d"])
  
      mod1 = s.pp.LabelBinarizer()
      s.fit(mod1)
      result = s.transform(mod1)
  
      expected = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1], [0, 1, 0]])
  
      self.assertIsInstance(result, pdml.ModelFrame)
      self.assert_numpy_array_almost_equal(result.values, expected)
      tm.assert_index_equal(result.index, s.index)
  
      mod1 = s.pp.LabelBinarizer()
      result = s.fit_transform(mod1)
  
      self.assertIsInstance(result, pdml.ModelFrame)
      self.assert_numpy_array_almost_equal(result.values, expected)
  
      inversed = result.inverse_transform(mod1)
      self.assertIsInstance(inversed, pdml.ModelFrame)
      self.assert_numpy_array_almost_equal(
          inversed.values.flatten(), arr
      )
      tm.assert_index_equal(result.index, s.index)
  
imports: import pytest
  import numpy
  import pandas
  import sklearn.datasets
  import sklearn.preprocessing
  import pandas_ml
  import pandas_ml.util.testing
label_desc: Use image node_id 17 for calling the TestPreprocessing obj's underlying member method code with example usage: obj.test_LabelBinarizer() without return types