code: def test_fit(self):
      # training data
      d = {"col1": ["a", "a", "c"], "col2": ["w", "e", "d"]}
      df = pd.DataFrame(data=d)
      lb = LabelBinarizer()
      # check first column
      lb.fit(df, "col1")
      data_json = lb.to_json()
      self.assertTrue("new_columns" in data_json)
      # we take alphabetical order
      self.assertTrue("col1_c" in data_json["new_columns"])
      self.assertTrue("col1_a" not in data_json["new_columns"])
      self.assertTrue("unique_values" in data_json)
      self.assertTrue("a" in data_json["unique_values"])
      self.assertTrue("c" in data_json["unique_values"])
  
      lb = LabelBinarizer()
      # check second column
      lb.fit(df, "col2")
      data_json = lb.to_json()
      self.assertTrue("new_columns" in data_json)
      self.assertTrue("col2_w" in data_json["new_columns"])
      self.assertTrue("col2_e" in data_json["new_columns"])
      self.assertTrue("col2_d" in data_json["new_columns"])
      self.assertTrue("unique_values" in data_json)
      self.assertTrue("w" in data_json["unique_values"])
      self.assertTrue("e" in data_json["unique_values"])
      self.assertTrue("d" in data_json["unique_values"])
  
file_path: mljar-supervised/tests/tests_preprocessing/test_label_binarizer.py
imports: import unittest
  import tempfile
  import json
  import numpy
  import pandas
  from supervised.preprocessing.label_binarizer import LabelBinarizer
label_desc: Use image node_id 1 for calling the LabelBinarizerTest obj's underlying member method code with example usage: obj.test_fit() without return types