code: def test_HandleMissingIsValueAndNanInTrain_ExpectAtValueSet(self):
      df = pd.DataFrame(
          {
              "color": [np.nan, np.nan, np.nan, "b", "b", "b"],
              "outcome": [2, 2, 0, 1, 0, 1],
          }
      )
  
      X = df.drop("outcome", axis=1)
      y = df.drop("color", axis=1)
  
      ce_leave = encoders.LeaveOneOutEncoder(
          cols=["color"], handle_missing="value"
      )
      obtained = ce_leave.fit_transform(X, y["outcome"])
  
      self.assertEqual(
          [1, 1, 2, 0.5, 1.0, 0.5], 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 5 for calling the TestLeaveOneOutEncoder obj's underlying member method code with example usage: obj.test_HandleMissingIsValueAndNanInTrain_ExpectAtValueSet() without return types