class_docstr: DataEditorSerde is used to serialize and deserialize the data editor state.
code: def deserialize(
      self, ui_value: Optional[str], widget_id: str = ""
  ) -> EditingState:
      data_editor_state: EditingState = (
          {
              "edited_rows": {},
              "added_rows": [],
              "deleted_rows": [],
          }
          if ui_value is None
          else json.loads(ui_value)
      )
  
      # Make sure that all editing state keys are present:
      if "edited_rows" not in data_editor_state:
          data_editor_state["edited_rows"] = {}
  
      if "deleted_rows" not in data_editor_state:
          data_editor_state["deleted_rows"] = []
  
      if "added_rows" not in data_editor_state:
          data_editor_state["added_rows"] = []
  
      # Convert the keys (numerical row positions) to integers.
      # The keys are strings because they are serialized to JSON.
      data_editor_state["edited_rows"] = {
          int(k): v for k, v in data_editor_state["edited_rows"].items()
      }
      return data_editor_state
  
imports: from __future__ import annotations
  import json
  from dataclasses import dataclass
  from decimal import Decimal
  from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Mapping, Optional, Set, Tuple, TypeVar, Union, cast, overload
  import pandas
  import pyarrow
  from typing_extensions import Literal, TypeAlias, TypedDict
  from streamlit import logger
  from streamlit import type_util
  from streamlit.deprecation_util import deprecate_func_name
  from streamlit.elements.form import current_form_id
  from streamlit.elements.lib.column_config_utils import INDEX_IDENTIFIER, ColumnConfigMapping, ColumnConfigMappingInput, ColumnDataKind, DataframeSchema, apply_data_specific_configs, determine_dataframe_schema, is_type_compatible, marshall_column_config, process_config_mapping, update_column_config
  from streamlit.elements.lib.pandas_styler_utils import marshall_styler
  from streamlit.elements.utils import check_callback_rules, check_session_state_rules
  from streamlit.errors import StreamlitAPIException
  from streamlit.proto.Arrow_pb2 import Arrow
  from streamlit.runtime.metrics_util import gather_metrics
  from streamlit.runtime.scriptrunner import get_script_run_ctx
  from streamlit.runtime.state import WidgetArgs, WidgetCallback, WidgetKwargs, register_widget
  from streamlit.runtime.state.common import compute_widget_id
  from streamlit.type_util import DataFormat, DataFrameGenericAlias, Key, is_type, to_key
  from streamlit.util import calc_md5
label_desc: Use image node_id 1 for calling the DataEditorSerde obj's underlying member method code with example usage: obj.deserialize(ui_value, widget_id) and returns: data_editor_state