docstr: Test that the process_config_mapping function correctly processes a config mapping.
docstr_tok: ["Test","that","the","process_config_mapping","function","correctly","processes","a","config","mapping","."]
code: def test_process_config_mapping(self):
      """Test that the process_config_mapping function correctly processes a config mapping."""
      config_1: ColumnConfigMappingInput = {
          "index": {"label": "Index", "width": "medium"},
          "col1": {
              "label": "Column 1",
              "width": "small",
              "required": True,
              "type_config": {"type": "link"},
          },
      }
      self.assertEqual(
          process_config_mapping(config_1),
          config_1,
          "Expected no changes to config mapping.",
      )
  
      config_2: ColumnConfigMappingInput = {
          "index": {"label": "Index", "width": "medium"},
          "col1": "Column 1",
      }
  
      self.assertEqual(
          process_config_mapping(config_2),
          {
              "index": {"label": "Index", "width": "medium"},
              "col1": {"label": "Column 1"},
          },
          "Expected string to be converted to valid column config dict with string as label.",
      )
  
      config_3: ColumnConfigMappingInput = {
          "index": {"label": "Index", "width": "medium"},
          "col1": None,
      }
      # The None should be converted to a valid column config dict:
      self.assertEqual(
          process_config_mapping(config_3),
          {
              "index": {"label": "Index", "width": "medium"},
              "col1": {"hidden": True},
          },
          "Expected None to be converted to valid column config dict with hidden=True.",
      )
  
      config_4: ColumnConfigMappingInput = None  # type: ignore
  
      self.assertEqual(
          process_config_mapping(config_4),
          {},
          "Expected None to be converted to empty dict.",
      )
  
      with self.assertRaises(StreamlitAPIException):
          process_config_mapping({"col1": ["a", "b"]})
  
imports: from __future__ import annotations
  import datetime
  import unittest
  from decimal import Decimal
  import numpy
  import pandas
  import pyarrow
  from parameterized import parameterized
  from streamlit.elements.lib.column_config_utils import _EDITING_COMPATIBILITY_MAPPING, INDEX_IDENTIFIER, ColumnConfigMapping, ColumnConfigMappingInput, ColumnDataKind, _convert_column_config_to_json, _determine_data_kind, _determine_data_kind_via_arrow, _determine_data_kind_via_inferred_type, _determine_data_kind_via_pandas_dtype, apply_data_specific_configs, determine_dataframe_schema, is_type_compatible, process_config_mapping, update_column_config
  from streamlit.elements.lib.column_types import ColumnConfig
  from streamlit.errors import StreamlitAPIException
  from streamlit.type_util import DataFormat
label_desc: Use image node_id 8 for calling the ColumnConfigUtilsTest obj's underlying member method code with example usage: obj.test_process_config_mapping() without return types