code: def test_HandleUnknownValue_HaveUnknownInTest_ExpectMean(self):
      train = pd.Series(["a", "a", "a", "b", "b", "b"], name="color")
      target = pd.Series([1.6, 0, 0, 1, 0, 1], name="target")
      test = pd.Series(["b", "c"], name="color")
      test_target = pd.Series([0, 0])
  
      ce_leave = encoders.LeaveOneOutEncoder(
          cols=["color"], handle_unknown="value"
      )
      ce_leave.fit(train, target)
      obtained = ce_leave.transform(test, test_target)
  
      self.assertEqual([1.0, 0.6], list(obtained["color"]))
  
file_path: category_encoders/tests/test_leave_one_out.py
imports: import pandas
  from unittest import TestCase
  import tests.helpers
  import numpy
  import category_encoders
label_desc: Use image node_id 8 for calling the TestLeaveOneOutEncoder obj's underlying member method code with example usage: obj.test_HandleUnknownValue_HaveUnknownInTest_ExpectMean() without return types