code: def _plot_image(
      data,
      ax,
      this_type,
      picks,
      cmap,
      unit,
      units,
      scalings,
      times,
      xlim,
      ylim,
      titles,
      colorbar=True,
      mask=None,
      mask_cmap=None,
      mask_style=None,
      mask_alpha=0.25,
      nave=None,
      time_unit="s",
      show_names=False,
      ch_names=None,
  ):
      """Plot images."""
      import matplotlib.pyplot as plt
  
      assert time_unit is not None
  
      if show_names == "auto":
          if picks is not None:
              show_names = "all" if len(picks) < 25 else True
          else:
              show_names = False
  
      cmap = _setup_cmap(cmap)
  
      ch_unit = units[this_type]
      this_scaling = scalings[this_type]
      if unit is False:
          this_scaling = 1.0
          ch_unit = "NA"  # no unit
  
      if picks is not None:
          data = data[picks]
          if mask is not None:
              mask = mask[picks]
      # Show the image
      # Set amplitude scaling
      data = this_scaling * data
      if ylim is None or this_type not in ylim:
          vmax = np.abs(data).max()
          vmin = -vmax
      else:
          vmin, vmax = ylim[this_type]
  
      _check_if_nan(data)
  
      im, t_end = _plot_masked_image(
          ax,
          data,
          times,
          mask,
          yvals=None,
          cmap=cmap[0],
          vmin=vmin,
          vmax=vmax,
          mask_style=mask_style,
          mask_alpha=mask_alpha,
          mask_cmap=mask_cmap,
      )
  
      # ignore xlim='tight'; happens automatically with `extent` in imshow
      xlim = None if xlim == "tight" else xlim
      if xlim is not None:
          ax.set_xlim(xlim)
  
      if colorbar:
          cbar = plt.colorbar(im, ax=ax)
          cbar.ax.set_title(ch_unit)
          if cmap[1]:
              ax.CB = DraggableColorbar(
                  cbar, im, "evoked_image", this_type
              )
  
      ylabel = "Channels" if show_names else "Channel (index)"
      t = (
          titles[this_type]
          + " (%d channel%s" % (len(data), _pl(data))
          + t_end
      )
      ax.set(ylabel=ylabel, xlabel=f"Time ({time_unit})", title=t)
      _add_nave(ax, nave)
  
      yticks = np.arange(len(picks))
      if show_names != "all":
          yticks = np.intersect1d(
              np.round(ax.get_yticks()).astype(int), yticks
          )
      yticklabels = (
          np.array(ch_names)[picks] if show_names else np.array(picks)
      )
      ax.set(yticks=yticks, yticklabels=yticklabels[yticks])
  
imports: from copy import deepcopy
  from functools import partial
  from itertools import cycle
  from numbers import Integral
  import numpy
  from .._fiff.pick import _DATA_CH_TYPES_SPLIT, _PICK_TYPES_DATA_DICT, _VALID_CHANNEL_TYPES, _picks_to_idx, channel_indices_by_type, channel_type, pick_info
  from ..defaults import _handle_default
  from ..fixes import _is_last_row
  from ..utils import _check_ch_locs, _check_if_nan, _clean_names, _is_numeric, _pl, _to_rgb, _validate_type, fill_doc, logger, verbose, warn
  from .topo import _plot_evoked_topo
  from .topomap import _check_sphere, _draw_outlines, _get_pos_outlines, _make_head_outlines, _prepare_topomap, _prepare_topomap_plot, _set_contour_locator, plot_topomap
  from .utils import DraggableColorbar, _check_cov, _check_delayed_ssp, _check_option, _check_time_unit, _draw_proj_checkbox, _get_cmap, _get_color_list, _make_combine_callable, _plot_masked_image, _prepare_joint_axes, _process_times, _prop_kw, _set_title_multiple_electrodes, _set_window_title, _setup_ax_spines, _setup_cmap, _setup_plot_projector, _setup_vmin_vmax, _triage_rank_sss, _trim_ticks, _validate_if_list_of_axes, plt_show
label_desc: Use image node_id 12 for calling a global function with example usage: _plot_image(data, ax, this_type, picks, cmap, unit, units, scalings, times, xlim, ylim, titles, colorbar, mask, mask_cmap, mask_style, mask_alpha, nave, time_unit, show_names, ch_names) without return types