class_docstr: Auxiliary class to decouple display handling logic from other functionality.
class_docstr_tok: ["Auxiliary","class","to","decouple","display","handling","logic","from","other","functionality","."]
docstr: Handle plotly figure item.
docstr_tok: ["Handle","plotly","figure","item","."]
code: def handle_figure(
      cls, item: BaseFigure, index: int, **kwargs
  ) -> t.Dict[str, t.Any]:
      """Handle plotly figure item."""
      return {"type": "plotly", "payload": item.to_json()}
  
imports: import base64
  import typing
  import pandas
  from pandas.io.formats.style import Styler
  from plotly.basedatatypes import BaseFigure
  from typing_extensions import TypedDict
  from deepchecks.core import check_result
  from deepchecks.core import checks
  from deepchecks.core.serialization.abc import ABCDisplayItemsHandler, JsonSerializer
  from deepchecks.core.serialization.common import aggregate_conditions, normalize_value
label_desc: Use image node_id 4 for calling the DisplayItemsHandler obj's underlying member method code with example usage: obj.handle_figure(cls, item, index) and returns: dict