code: def test_fit(self):
      # training data
      d = {
          "col1": ["a", "a", "c"],
          "col2": ["w", "e", "d"],
          "y": [1, 2, 0],
      }
      df = pd.DataFrame(data=d)
      le = LooEncoder(cols=["col1"])
      le.fit(df[["col1", "col2"]], df["y"])
  
      self.assertTrue(le.enc is not None)
      self.assertTrue(le.enc._dim == 2)
      assert_almost_equal(le.enc._mean, 1.0)
      self.assertTrue("col1" in le.enc.mapping)
      self.assertTrue("col2" not in le.enc.mapping)
  
file_path: mljar-supervised/tests/tests_preprocessing/test_loo_encoder.py
imports: import unittest
  import tempfile
  import json
  import numpy
  import pandas
  from numpy.testing import assert_almost_equal
  from supervised.preprocessing.loo_encoder import LooEncoder
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