code: def test_handle_unknown_have_new_value_expect_negative_1_categorical(
      self,
  ):
      cities = ["st louis", "chicago", "los angeles"]
      train = pd.DataFrame(
          {"city": pd.Categorical(cities[:-1], categories=cities)}
      )
      test = pd.DataFrame(
          {"city": pd.Categorical(cities[1:], categories=cities)}
      )
  
      expected = [2.0, -1.0]
  
      enc = encoders.OrdinalEncoder(handle_missing="return_nan")
      enc.fit(train)
      result = enc.transform(test)["city"].tolist()
  
      self.assertEqual(expected, result)
  
imports: import pandas
  from unittest import TestCase
  import tests.helpers
  import numpy
  import category_encoders
label_desc: Use image node_id 7 for calling the TestOrdinalEncoder obj's underlying member method code with example usage: obj.test_handle_unknown_have_new_value_expect_negative_1_categorical() without return types