docstr: Given a holoviews object and a percentage size, apply heuristics
  to compute a suitable figure size. For instance, scaling layouts
  and grids linearly can result in unwieldy figure sizes when there
  are a large number of elements. As ad hoc heuristics are used,
  this functionality is kept separate from the plotting classes
  themselves.
  
  Used by the IPython Notebook display hooks and the save
  utility. Note that this can be overridden explicitly per object
  using the fig_size and size plot options.
docstr_tok: ["Given","a","holoviews","object","and","a","percentage","size",",","apply","heuristics","to","compute","a","suitable","figure","size",".","For","instance",",","scaling","layouts","and","grids","linearly","can","result","in","unwieldy","figure","sizes","when","there","are","a","large","number","of","elements",".","As","ad","hoc","heuristics","are","used",",","this","functionality","is","kept","separate","from","the","plotting","classes","themselves",".","Used","by","the","IPython","Notebook","display","hooks","and","the","save","utility",".","Note","that","this","can","be","overridden","explicitly","per","object","using","the","fig_size","and","size","plot","options","."]
code: def plot_options(cls, obj, percent_size):
      """
      Given a holoviews object and a percentage size, apply heuristics
      to compute a suitable figure size. For instance, scaling layouts
      and grids linearly can result in unwieldy figure sizes when there
      are a large number of elements. As ad hoc heuristics are used,
      this functionality is kept separate from the plotting classes
      themselves.
  
      Used by the IPython Notebook display hooks and the save
      utility. Note that this can be overridden explicitly per object
      using the fig_size and size plot options.
      """
      obj = obj.last if isinstance(obj, HoloMap) else obj
      plot = Store.registry[cls.backend].get(type(obj), None)
      if not hasattr(plot, "width") or not hasattr(plot, "height"):
          from .plot import BokehPlot
  
          plot = BokehPlot
      options = plot.lookup_options(obj, "plot").options
      width = options.get("width", plot.width)
      height = options.get("height", plot.height)
      if width is not None:
          options["width"] = int(width)
      if height is not None:
          options["height"] = int(height)
      return dict(options)
  
imports: import base64
  import logging
  from io import BytesIO
  import bokeh
  import param
  from bokeh.document import Document
  from bokeh.io import curdoc
  from bokeh.models import Model
  from bokeh.themes.theme import Theme
  from panel.io.notebook import render_mimebundle
  from panel.io.state import state
  from param.parameterized import bothmethod
  from ...core import HoloMap, Store
  from ..plot import Plot
  from ..renderer import HTML_TAGS, MIME_TYPES, Renderer
  from .util import compute_plot_size
label_desc: Use image node_id 4 for calling the BokehRenderer obj's underlying member method code with example usage: obj.plot_options(cls, obj, percent_size) and returns: dict