code: def test_validate_mapping(self):
      custom_mapping = [
          {
              "col": "col1",
              "mapping": {np.NaN: 0, "a": 1, "b": 2},
          },  # The mapping from the documentation
          {"col": "col2", "mapping": {np.NaN: -3, "x": 11, "y": 2}},
      ]
      expected_valid_mapping = [
          {
              "col": "col1",
              "mapping": pd.Series({np.NaN: 0, "a": 1, "b": 2}),
          },  # The mapping from the documentation
          {
              "col": "col2",
              "mapping": pd.Series({np.NaN: -3, "x": 11, "y": 2}),
          },
      ]
      enc = encoders.OrdinalEncoder()
      actual_valid_mapping = enc._validate_supplied_mapping(
          custom_mapping
      )
      self.assertEqual(
          len(actual_valid_mapping), len(expected_valid_mapping)
      )
      for idx in range(len(actual_valid_mapping)):
          self.assertEqual(
              actual_valid_mapping[idx]["col"],
              expected_valid_mapping[idx]["col"],
          )
          pd.testing.assert_series_equal(
              actual_valid_mapping[idx]["mapping"],
              expected_valid_mapping[idx]["mapping"],
          )
  
imports: import pandas
  from unittest import TestCase
  import tests.helpers
  import numpy
  import category_encoders
label_desc: Use image node_id 21 for calling the TestOrdinalEncoder obj's underlying member method code with example usage: obj.test_validate_mapping() without return types