code: def test_fit(self):
      # training data
      d = {"col1": ["a", "a", "c"], "col2": ["w", "e", "d"]}
      df = pd.DataFrame(data=d)
      le = LabelEncoder()
      # check first column
      le.fit(df["col1"])
      data_json = le.to_json()
      # values from column should be in data json
      self.assertTrue("a" in data_json)
      self.assertTrue("c" in data_json)
      self.assertTrue("b" not in data_json)
      # there is alphabetical order for values
      self.assertEqual(0, data_json["a"])
      self.assertEqual(1, data_json["c"])
  
      # check next column
      le.fit(df["col2"])
      data_json = le.to_json()
      self.assertEqual(0, data_json["d"])
      self.assertEqual(1, data_json["e"])
      self.assertEqual(2, data_json["w"])
  
file_path: mljar-supervised/tests/tests_preprocessing/test_label_encoder.py
imports: import unittest
  import tempfile
  import json
  import numpy
  import pandas
  from supervised.preprocessing.label_encoder import LabelEncoder
label_desc: Use image node_id 1 for calling the LabelEncoderTest obj's underlying member method code with example usage: obj.test_fit() without return types