code: def test_handle_missing_have_nan_fit_time_expect_as_category(self):
      train = pd.DataFrame(
          {
              "city": ["chicago", np.nan],
              "city_cat": pd.Categorical(["chicago", np.nan]),
          }
      )
  
      enc = encoders.OrdinalEncoder(handle_missing="value")
      out = enc.fit_transform(train)
  
      self.assertListEqual([1, 2], out["city"].tolist())
      self.assertListEqual([1, 2], out["city_cat"].tolist())
  
imports: import pandas
  from unittest import TestCase
  import tests.helpers
  import numpy
  import category_encoders
label_desc: Use image node_id 4 for calling the TestOrdinalEncoder obj's underlying member method code with example usage: obj.test_handle_missing_have_nan_fit_time_expect_as_category() without return types