class_docstr: Trait that describes 'CheckResult.dislay' processing logic.
class_docstr_tok: ["Trait","that","describes","'CheckResult.dislay","'","processing","logic","."]
docstr: Serialize display item.
docstr_tok: ["Serialize","display","item","."]
code: def handle_item(
      cls, item: "check_types.TDisplayItem", index: int, **kwargs
  ) -> t.Any:
      """Serialize display item."""
      if isinstance(item, str):
          return cls.handle_string(item, index, **kwargs)
      elif isinstance(item, (pd.DataFrame, Styler)):
          return cls.handle_dataframe(item, index, **kwargs)
      elif isinstance(item, BaseFigure):
          return cls.handle_figure(item, index, **kwargs)
      elif isinstance(item, check_types.DisplayMap):
          return cls.handle_display_map(item, index, **kwargs)
      elif callable(item):
          return cls.handle_callable(item, index, **kwargs)
      else:
          raise TypeError(
              f"Unable to handle display item of type: {type(item)}"
          )
  
imports: import abc
  import io
  import typing
  import pandas
  from ipywidgets.widgets import Widget
  from pandas.io.formats.style import Styler
  from plotly.basedatatypes import BaseFigure
  from typing_extensions import Protocol, runtime_checkable
  from deepchecks.core import check_result
  from deepchecks.core.serialization import common
label_desc: Use image node_id 3 for calling the ABCDisplayItemsHandler obj's underlying member method code with example usage: obj.handle_item(cls, item, index) and returns: cls, cls, cls, cls, cls