code: def test_HandleMissingError(self):
      data_no_missing = ["A", "B", "B"]
      data_w_missing = [np.nan, "B", "B"]
      encoder = encoders.OneHotEncoder(handle_missing="error")
  
      result = encoder.fit_transform(data_no_missing)
      expected = [[1, 0], [0, 1], [0, 1]]
      self.assertEqual(result.to_numpy().tolist(), expected)
  
      self.assertRaisesRegex(
          ValueError, ".*null.*", encoder.transform, data_w_missing
      )
  
      self.assertRaisesRegex(
          ValueError, ".*null.*", encoder.fit, data_w_missing
      )
  
imports: import pandas
  from unittest import TestCase
  import numpy
  import tests.helpers
  import category_encoders
label_desc: Use image node_id 10 for calling the TestOneHotEncoderTestCase obj's underlying member method code with example usage: obj.test_HandleMissingError() without return types