code: def test_HandleMissingIsValueAndNanInTest_ExpectMean(self):
      df = pd.DataFrame(
          {
              "color": ["a", "a", "a", "b", "b", "b"],
              "outcome": [1.6, 0, 0, 1, 0, 1],
          }
      )
  
      train = df.drop("outcome", axis=1)
      target = df.drop("color", axis=1)
      test = pd.Series([np.nan, "b"], name="color")
      test_target = pd.Series([0, 0])
  
      enc = encoders.TargetEncoder(
          cols=["color"], handle_missing="value"
      )
      enc.fit(train, target["outcome"])
      obtained = enc.transform(test, test_target)
  
      self.assertEqual(0.6, list(obtained["color"])[0])
  
imports: import pandas
  from unittest import TestCase
  import tests.helpers
  import numpy
  from category_encoders.datasets import load_postcodes, load_compass
  import category_encoders
label_desc: Use image node_id 7 for calling the TestTargetEncoder obj's underlying member method code with example usage: obj.test_HandleMissingIsValueAndNanInTest_ExpectMean() without return types