class_docstr: Class to handle logic from ForestPlot.
class_docstr_tok: ["Class","to","handle","logic","from","ForestPlot","."]
code: def __init__(
      self,
      datasets,
      var_names,
      model_names,
      combined,
      combine_dims,
      colors,
      labeller,
  ):
      self.data = datasets
  
      if model_names is None:
          if len(self.data) > 1:
              model_names = [
                  f"Model {idx}" for idx, _ in enumerate(self.data)
              ]
          else:
              model_names = [""]
      elif len(model_names) != len(self.data):
          raise ValueError(
              "The number of model names does not match the number of models"
          )
  
      self.model_names = list(
          reversed(model_names)
      )  # y-values are upside down
  
      if var_names is None:
          if len(self.data) > 1:
              self.var_names = list(
                  set().union(
                      *[
                          OrderedDict(datum.data_vars)
                          for datum in self.data
                      ]
                  )
              )
          else:
              self.var_names = list(
                  reversed(
                      *[
                          OrderedDict(datum.data_vars)
                          for datum in self.data
                      ]
                  )
              )
      else:
          self.var_names = list(
              reversed(var_names)
          )  # y-values are upside down
  
      self.combined = combined
      self.combine_dims = combine_dims
  
      if colors == "cycle":
          colors = [
              prop
              for _, prop in zip(
                  range(len(self.data)),
                  cycle(
                      plt.rcParams["axes.prop_cycle"].by_key()["color"]
                  ),
              )
          ]
      elif isinstance(colors, str):
          colors = [colors for _ in self.data]
  
      self.colors = list(reversed(colors))  # y-values are upside down
      self.labeller = labeller
  
      self.plotters = self.make_plotters()
  
imports: from collections import OrderedDict, defaultdict
  from itertools import cycle, tee
  import bokeh.plotting
  import matplotlib.pyplot
  import numpy
  from bokeh.models import Band, ColumnDataSource, DataRange1d
  from bokeh.models.annotations import Title, Legend
  from bokeh.models.tickers import FixedTicker
  from ....sel_utils import xarray_var_iter
  from ....rcparams import rcParams
  from ....stats import hdi
  from ....stats.density_utils import get_bins, histogram, kde
  from ....stats.diagnostics import _ess, _rhat
  from ....utils import conditional_jit
  from ...plot_utils import _scale_fig_size
  from ..None import show_layout
  from .None import backend_kwarg_defaults
label_desc: Use image node_id 1 to create a new PlotHandler object  with example: obj = PlotHandler(datasets, var_names, model_names, combined, combine_dims, colors, labeller)