class_docstr: Utility renderer using Bokeh to render a grid of plots over the same (x, y) range.
  
  Args:
      nrows (int, optional): Number of rows of plots, default ``1``.
      ncols (int, optional): Number of columns of plots, default ``1``.
      figsize (tuple(float, float), optional): Figure size in inches (assuming 100 dpi), default
          ``(9, 9)``.
      show_frame (bool, optional): Whether to show frame and axes ticks, default ``True``.
      want_svg (bool, optional): Whether output is required in SVG format or not, default
          ``False``.
  
  Warning:
      :class:`~contourpy.util.bokeh_renderer.BokehRenderer`, unlike
      :class:`~contourpy.util.mpl_renderer.MplRenderer`, needs to be told in advance if output to
      SVG format will be required later, otherwise it will assume PNG output.
class_docstr_tok: ["Utility","renderer","using","Bokeh","to","render","a","grid","of","plots","over","the","same","(","x",",","y",")","range",".","Args",":","nrows","(","int",",","optional",")",":","Number","of","rows","of","plots",",","default","``","1","``",".","ncols","(","int",",","optional",")",":","Number","of","columns","of","plots",",","default","``","1","``",".","figsize","(","tuple","(","float",",","float",")",",","optional",")",":","Figure","size","in","inches","(","assuming","100","dpi",")",",","default","``","(","9",",","9",")","``",".","show_frame","(","bool",",","optional",")",":","Whether","to","show","frame","and","axes","ticks",",","default","``","True","``",".","want_svg","(","bool",",","optional",")",":","Whether","output","is","required","in","SVG","format","or","not",",","default","``","False","``",".","Warning",":",":","class",":","`","~contourpy.util.bokeh_renderer.BokehRenderer","`",",","unlike",":","class",":","`","~contourpy.util.mpl_renderer.MplRenderer","`",",","needs","to","be","told","in","advance","if","output","to","SVG","format","will","be","required","later",",","otherwise","it","will","assume","PNG","output","."]
code: def __init__(
      self,
      nrows: int = 1,
      ncols: int = 1,
      figsize: tuple[float, float] = (9, 9),
      show_frame: bool = True,
      want_svg: bool = False,
  ) -> None:
      self._want_svg = want_svg
      self._palette = Category10[10]
  
      total_size = 100 * np.asarray(
          figsize, dtype=int
      )  # Assuming 100 dpi.
  
      nfigures = nrows * ncols
      self._figures = []
      backend = "svg" if self._want_svg else "canvas"
      for _ in range(nfigures):
          fig = figure(output_backend=backend)
          fig.xgrid.visible = False
          fig.ygrid.visible = False
          self._figures.append(fig)
          if not show_frame:
              fig.outline_line_color = None  # type: ignore[assignment]
              fig.axis.visible = False
  
      self._layout = gridplot(
          self._figures,
          ncols=ncols,
          toolbar_location=None,  # type: ignore[arg-type]
          width=total_size[0] // ncols,
          height=total_size[1] // nrows,
      )
  
imports: from __future__ import annotations
  import io
  from typing import TYPE_CHECKING, Any
  from bokeh.io import export_png, export_svg, show
  from bokeh.io.export import get_screenshot_as_png
  from bokeh.layouts import gridplot
  from bokeh.models.annotations.labels import Label
  from bokeh.palettes import Category10
  from bokeh.plotting import figure
  import numpy
  from contourpy import FillType, LineType
  from contourpy.enum_util import as_fill_type, as_line_type
  from contourpy.util.bokeh_util import filled_to_bokeh, lines_to_bokeh
  from contourpy.util.renderer import Renderer
label_desc: Use image node_id 1 to create a new BokehRenderer object from inherited base classes: Renderer with example: obj = BokehRenderer(nrows, ncols, figsize, show_frame, want_svg)