code: def _plot_timeseries(
      ax,
      ch_idx,
      tmin,
      tmax,
      vmin,
      vmax,
      ylim,
      data,
      color,
      times,
      vline=None,
      x_label=None,
      y_label=None,
      colorbar=False,
      hline=None,
      hvline_color="w",
      labels=None,
  ):
      """Show time series on topo split across multiple axes."""
      import matplotlib.pyplot as plt
  
      picker_flag = False
      for data_, color_, times_ in zip(data, color, times):
          if not picker_flag:
              # use large tol for picker so we can click anywhere in the axes
              line = ax.plot(
                  times_, data_[ch_idx], color=color_, picker=True
              )[0]
              line.set_pickradius(1e9)
              picker_flag = True
          else:
              ax.plot(times_, data_[ch_idx], color=color_)
  
      def _format_coord(x, y, labels, ax):
          """Create status string based on cursor coordinates."""
          # find indices for datasets near cursor (if any)
          tdiffs = [np.abs(tvec - x).min() for tvec in times]
          nearby = [
              k
              for k, tdiff in enumerate(tdiffs)
              if tdiff < (tmax - tmin) / 100
          ]
          xlabel = ax.get_xlabel()
          xunit = (
              xlabel[xlabel.find("(") + 1 : xlabel.find(")")]
              if "(" in xlabel and ")" in xlabel
              else "s"
          )
          timestr = "%6.3f %s: " % (x, xunit)
          if not nearby:
              return "%s Nothing here" % timestr
          labels = [""] * len(nearby) if labels is None else labels
          nearby_data = [(data[n], labels[n], times[n]) for n in nearby]
          ylabel = ax.get_ylabel()
          yunit = (
              ylabel[ylabel.find("(") + 1 : ylabel.find(")")]
              if "(" in ylabel and ")" in ylabel
              else ""
          )
          # try to estimate whether to truncate condition labels
          slen = (
              9
              + len(xunit)
              + sum([12 + len(yunit) + len(label) for label in labels])
          )
          bar_width = (ax.figure.get_size_inches() * ax.figure.dpi)[
              0
          ] / 5.5
          # show labels and y values for datasets near cursor
          trunc_labels = bar_width < slen
          s = timestr
          for data_, label, tvec in nearby_data:
              idx = np.abs(tvec - x).argmin()
              s += "%7.2f %s" % (data_[ch_idx, idx], yunit)
              if trunc_labels:
                  label = (
                      label
                      if len(label) <= 10
                      else "%s..%s" % (label[:6], label[-2:])
                  )
              s += " [%s] " % label if label else " "
          return s
  
      ax.format_coord = lambda x, y: _format_coord(
          x, y, labels=labels, ax=ax
      )
  
      def _cursor_vline(event):
          """Draw cursor (vertical line)."""
          ax = event.inaxes
          if not ax:
              return
          if ax._cursorline is not None:
              ax._cursorline.remove()
          ax._cursorline = ax.axvline(
              event.xdata, color=ax._cursorcolor
          )
          ax.figure.canvas.draw()
  
      def _rm_cursor(event):
          ax = event.inaxes
          if ax._cursorline is not None:
              ax._cursorline.remove()
              ax._cursorline = None
          ax.figure.canvas.draw()
  
      ax._cursorline = None
      # choose cursor color based on perceived brightness of background
      facecol = _to_rgb(ax.get_facecolor())
      face_brightness = np.dot(facecol, [299, 587, 114])
      ax._cursorcolor = "white" if face_brightness < 150 else "black"
  
      plt.connect("motion_notify_event", _cursor_vline)
      plt.connect("axes_leave_event", _rm_cursor)
  
      ymin, ymax = ax.get_ylim()
      # don't pass vline or hline here (this fxn doesn't do hvline_color):
      _setup_ax_spines(ax, [], tmin, tmax, ymin, ymax, hline=False)
      ax.figure.set_facecolor("k" if hvline_color == "w" else "w")
      ax.spines["bottom"].set_color(hvline_color)
      ax.spines["left"].set_color(hvline_color)
      ax.tick_params(axis="x", colors=hvline_color, which="both")
      ax.tick_params(axis="y", colors=hvline_color, which="both")
      ax.title.set_color(hvline_color)
      ax.xaxis.label.set_color(hvline_color)
      ax.yaxis.label.set_color(hvline_color)
  
      if x_label is not None:
          ax.set_xlabel(x_label)
  
      if y_label is not None:
          if isinstance(y_label, list):
              ax.set_ylabel(y_label[ch_idx])
          else:
              ax.set_ylabel(y_label)
  
      if vline is not None:
          vline = [vline] if _is_numeric(vline) else vline
          for vline_ in vline:
              plt.axvline(
                  vline_,
                  color=hvline_color,
                  linewidth=1.0,
                  linestyle="--",
              )
      if hline is not None:
          hline = [hline] if _is_numeric(hline) else hline
          for hline_ in hline:
              plt.axhline(
                  hline_, color=hvline_color, linewidth=1.0, zorder=10
              )
  
      if colorbar:
          plt.colorbar()
  
imports: from copy import deepcopy
  from functools import partial
  import numpy
  from scipy import ndimage
  from .._fiff.pick import channel_type, pick_types
  from ..defaults import _handle_default
  from ..utils import Bunch, _check_option, _clean_names, _is_numeric, _to_rgb, fill_doc
  from .utils import DraggableColorbar, _check_cov, _check_delayed_ssp, _draw_proj_checkbox, _plot_masked_image, _setup_ax_spines, _setup_vmin_vmax, add_background_image, plt_show
label_desc: Use image node_id 10 for calling a global function with example usage: _plot_timeseries(ax, ch_idx, tmin, tmax, vmin, vmax, ylim, data, color, times, vline, x_label, y_label, colorbar, hline, hvline_color, labels) and returns: s, unknown