class_docstr: 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 = [None]
      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":
          # TODO: Use matplotlib prop cycle instead
          colors = [f"C{idx}" for idx, _ in enumerate(self.data)]
      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 tee
  import matplotlib.pyplot
  import numpy
  from matplotlib.colors import to_rgba
  from matplotlib.lines import Line2D
  from ....stats import hdi
  from ....stats.density_utils import get_bins, histogram, kde
  from ....stats.diagnostics import _ess, _rhat
  from ....sel_utils import xarray_var_iter
  from ....utils import conditional_jit
  from ...plot_utils import _scale_fig_size
  from .None import backend_kwarg_defaults, backend_show
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)