docstr: Given a HoloViews Viewable return a corresponding figure dictionary.
  Allows cleaning the dictionary of any internal properties that were added
docstr_tok: ["Given","a","HoloViews","Viewable","return","a","corresponding","figure","dictionary",".","Allows","cleaning","the","dictionary","of","any","internal","properties","that","were","added"]
code: def get_plot_state(
      self_or_cls, obj, doc=None, renderer=None, **kwargs
  ):
      """
      Given a HoloViews Viewable return a corresponding figure dictionary.
      Allows cleaning the dictionary of any internal properties that were added
      """
      fig_dict = super().get_plot_state(obj, renderer, **kwargs)
      config = fig_dict.get("config", {})
  
      # Remove internal properties (e.g. '_id', '_dim')
      clean_internal_figure_properties(fig_dict)
  
      # Run through Figure constructor to normalize keys
      # (e.g. to expand magic underscore notation)
      fig_dict = go.Figure(fig_dict).to_dict()
      fig_dict["config"] = config
  
      # Remove template
      fig_dict.get("layout", {}).pop("template", None)
      return fig_dict
  
file_path: holoviews/holoviews/plotting/plotly/renderer.py
imports: import base64
  from io import BytesIO
  import panel
  import param
  from param.parameterized import bothmethod
  from ...core import HoloMap
  from ...core.options import Store
  from ..renderer import HTML_TAGS, MIME_TYPES, Renderer
  from .callbacks import callbacks
  from .util import clean_internal_figure_properties
label_desc: Use image node_id 1 for calling the PlotlyRenderer obj's underlying member method code with example usage: obj.get_plot_state(_or_cls, obj, doc, renderer) and returns: fig_dict