code: def test_helmert_preserve_dimension_4(self):
      train = ["A", "B", "C"]
      test = ["D", "B", "C", None]
  
      encoder = encoders.HelmertEncoder(
          handle_unknown="value", handle_missing="value"
      )
      encoder.fit(train)
      test_t = encoder.transform(test)
  
      expected = [[1, 0, 0], [1, 1, -1], [1, 0, 2], [1, 0, 0]]
      self.assertEqual(test_t.to_numpy().tolist(), expected)
  
file_path: category_encoders/tests/test_helmert.py
imports: import pandas
  from unittest import TestCase
  import numpy
  import category_encoders
label_desc: Use image node_id 4 for calling the TestHelmertEncoder obj's underlying member method code with example usage: obj.test_helmert_preserve_dimension_4() without return types