code: def stems(
      ys: list,
      titles: list = None,
      sync_axes: bool = True,
      rendering: str = "matplotlib",
      fig_size: tuple = None,
  ):
      """Plot several stem plots using either matplotlib or bokeh rendering.
      Axes can be synchronized, which means that all xlim and ylim are the
      same for matplotlib rendering, while zooming is done simultaneously on all
      stem plots for bokeh rendering.
  
      Parameters
      ----------
      ys : `list` of `numpy.array`
          A list of numpy arrays to be plotted using stem plots
  
      titles : `list` of `str`, default=`None`
          The titles of each stem plot
  
      sync_axes : `bool`, default=`True`
          If `True`, axes can be synchronized, which means that for
          matplotlib rendering, the
          xlim and ylim are the same, while for bokeh rendering, this means that
          zooming is done simultaneously on all stems.
  
          If True, the axes of the stem plot are synchronized (available only
          with ``rendering='bokeh'``
  
      rendering : {'matplotlib', 'bokeh'}, default='matplotlib'
          Rendering library. 'bokeh' might fail if the module is not installed.
  
      fig_size: `tuple`, default=`None`
          Figure size. Default is (8, 2.5) for matplotlib rendering and
          (600, 200) for bokeh rendering.
  
      Returns
      -------
      output : `bokeh.models.layouts.Column`, `matplotlib.pyplot.Figure` or `None`
          Depending on the rendering type, returns a ``bokeh`` or a ``matplotlib``
          object containing the layout of the plot, or `None` otherwise
      """
      if titles is not None:
          if len(ys) != len(titles):
              raise ValueError(
                  "length of ``titles`` differs from the length of "
                  "``ys``"
              )
      else:
          titles = len(ys) * [None]
  
      if rendering == "matplotlib":
          if fig_size is None:
              fig_size = (8, 2.5)
          if sync_axes:
              x_min = 0
              x_max = max(y.shape[0] for y in ys)
              y_min = min(y.min() for y in ys)
              y_max = max(y.max() for y in ys)
              y_min *= 1 - 5e-2
              y_max *= 1 + 5e-2
              x_range = (x_min, x_max)
              y_range = (y_min, y_max)
          else:
              x_range = None
              y_range = None
          fig = __stems_matplotlib(
              ys=ys,
              titles=titles,
              x_range=x_range,
              y_range=y_range,
              fig_size=fig_size,
          )
          fig.tight_layout()
      elif rendering == "bokeh":
          from bokeh.plotting import show as bk_show
  
          if fig_size is None:
              fig_size = (600, 200)
          fig = __stems_bokeh(
              ys=ys,
              titles=titles,
              sync_axes=sync_axes,
              fig_size=fig_size,
          )
          bk_show(fig)
      else:
          raise ValueError(
              "Unknown rendering type. Expected 'matplotlib' or "
              "'bokeh', got '%s'" % rendering
          )
  
imports: import numpy
  from matplotlib.pyplot import Axes
label_desc: Use image node_id 5 for calling a global function with example usage: stems(ys, titles, sync_axes, rendering, fig_size) without return types