code: def test_HaveNoneAndNan_ExpectCodesAsOne(self):
      train = pd.DataFrame({"city": [np.nan, None]})
      expected = [1, 1]
  
      enc = encoders.OrdinalEncoder(cols=["city"])
      result = enc.fit_transform(train)["city"].tolist()
  
      self.assertEqual(expected, result)
  
      new_nan = pd.DataFrame(
          {
              "city": [
                  np.nan,
              ]
          }
      )
      result_new_nan = enc.transform(new_nan)["city"].tolist()
      expected_new_nan = [1]
      self.assertEqual(expected_new_nan, result_new_nan)
  
      new_none = pd.DataFrame(
          {
              "city": [
                  None,
              ]
          }
      )
      result_new_none = enc.transform(new_none)["city"].tolist()
      expected_new_none = [1]
      self.assertEqual(expected_new_none, result_new_none)
  
imports: import pandas
  from unittest import TestCase
  import tests.helpers
  import numpy
  import category_encoders
label_desc: Use image node_id 13 for calling the TestOrdinalEncoder obj's underlying member method code with example usage: obj.test_HaveNoneAndNan_ExpectCodesAsOne() without return types