code: def plot_evoked_image(
      evoked,
      picks=None,
      exclude="bads",
      unit=True,
      show=True,
      clim=None,
      xlim="tight",
      proj=False,
      units=None,
      scalings=None,
      titles=None,
      axes=None,
      cmap="RdBu_r",
      colorbar=True,
      mask=None,
      mask_style=None,
      mask_cmap="Greys",
      mask_alpha=0.25,
      time_unit="s",
      show_names="auto",
      group_by=None,
      sphere=None,
  ):
      """Plot evoked data as images.
  
      Parameters
      ----------
      evoked : instance of Evoked
          The evoked data.
      %(picks_all)s
          This parameter can also be used to set the order the channels
          are shown in, as the channel image is sorted by the order of picks.
      exclude : list of str | 'bads'
          Channels names to exclude from being shown. If 'bads', the
          bad channels are excluded.
      unit : bool
          Scale plot with channel (SI) unit.
      show : bool
          Show figure if True.
      clim : dict | None
          Color limits for plots (after scaling has been applied). e.g.
          ``clim = dict(eeg=[-20, 20])``.
          Valid keys are eeg, mag, grad, misc. If None, the clim parameter
          for each channel equals the pyplot default.
      xlim : 'tight' | tuple | None
          X limits for plots.
      proj : bool | 'interactive'
          If true SSP projections are applied before display. If 'interactive',
          a check box for reversible selection of SSP projection vectors will
          be shown.
      units : dict | None
          The units of the channel types used for axes labels. If None,
          defaults to ``dict(eeg='µV', grad='fT/cm', mag='fT')``.
      scalings : dict | None
          The scalings of the channel types to be applied for plotting. If None,`
          defaults to ``dict(eeg=1e6, grad=1e13, mag=1e15)``.
      titles : dict | None
          The titles associated with the channels. If None, defaults to
          ``dict(eeg='EEG', grad='Gradiometers', mag='Magnetometers')``.
      axes : instance of Axes | list | dict | None
          The axes to plot to. If list, the list must be a list of Axes of
          the same length as the number of channel types. If instance of
          Axes, there must be only one channel type plotted.
          If ``group_by`` is a dict, this cannot be a list, but it can be a dict
          of lists of axes, with the keys matching those of ``group_by``. In that
          case, the provided axes will be used for the corresponding groups.
          Defaults to ``None``.
      cmap : matplotlib colormap | (colormap, bool) | 'interactive'
          Colormap. If tuple, the first value indicates the colormap to use and
          the second value is a boolean defining interactivity. In interactive
          mode the colors are adjustable by clicking and dragging the colorbar
          with left and right mouse button. Left mouse button moves the scale up
          and down and right mouse button adjusts the range. Hitting space bar
          resets the scale. Up and down arrows can be used to change the
          colormap. If 'interactive', translates to ``('RdBu_r', True)``.
          Defaults to ``'RdBu_r'``.
      colorbar : bool
          If True, plot a colorbar. Defaults to True.
  
          .. versionadded:: 0.16
      mask : ndarray | None
          An array of booleans of the same shape as the data. Entries of the
          data that correspond to ``False`` in the mask are masked (see
          ``do_mask`` below). Useful for, e.g., masking for statistical
          significance.
  
          .. versionadded:: 0.16
      mask_style : None | 'both' | 'contour' | 'mask'
          If ``mask`` is not None: if 'contour', a contour line is drawn around
          the masked areas (``True`` in ``mask``). If 'mask', entries not
          ``True`` in ``mask`` are shown transparently. If 'both', both a contour
          and transparency are used.
          If ``None``, defaults to 'both' if ``mask`` is not None, and is ignored
          otherwise.
  
           .. versionadded:: 0.16
      mask_cmap : matplotlib colormap | (colormap, bool) | 'interactive'
          The colormap chosen for masked parts of the image (see below), if
          ``mask`` is not ``None``. If None, ``cmap`` is reused. Defaults to
          ``Greys``. Not interactive. Otherwise, as ``cmap``.
      mask_alpha : float
          A float between 0 and 1. If ``mask`` is not None, this sets the
          alpha level (degree of transparency) for the masked-out segments.
          I.e., if 0, masked-out segments are not visible at all.
          Defaults to .25.
  
          .. versionadded:: 0.16
      time_unit : str
          The units for the time axis, can be "ms" or "s" (default).
  
          .. versionadded:: 0.16
      show_names : bool | 'auto' | 'all'
          Determines if channel names should be plotted on the y axis. If False,
          no names are shown. If True, ticks are set automatically by matplotlib
          and the corresponding channel names are shown. If "all", all channel
          names are shown. If "auto", is set to False if ``picks`` is ``None``,
          to ``True`` if ``picks`` contains 25 or more entries, or to "all"
          if ``picks`` contains fewer than 25 entries.
      group_by : None | dict
          If a dict, the values must be picks, and ``axes`` must also be a dict
          with matching keys, or None. If ``axes`` is None, one figure and one
          axis will be created for each entry in ``group_by``.Then, for each
          entry, the picked channels will be plotted to the corresponding axis.
          If ``titles`` are None, keys will become plot titles. This is useful
          for e.g. ROIs. Each entry must contain only one channel type.
          For example::
  
              group_by=dict(Left_ROI=[1, 2, 3, 4], Right_ROI=[5, 6, 7, 8])
  
          If None, all picked channels are plotted to the same axis.
      %(sphere_topomap_auto)s
  
      Returns
      -------
      fig : instance of matplotlib.figure.Figure
          Figure containing the images.
      """
      return _plot_evoked(
          evoked=evoked,
          picks=picks,
          exclude=exclude,
          unit=unit,
          show=show,
          ylim=clim,
          proj=proj,
          xlim=xlim,
          hline=None,
          units=units,
          scalings=scalings,
          titles=titles,
          axes=axes,
          plot_type="image",
          cmap=cmap,
          colorbar=colorbar,
          mask=mask,
          mask_style=mask_style,
          mask_cmap=mask_cmap,
          mask_alpha=mask_alpha,
          time_unit=time_unit,
          show_names=show_names,
          group_by=group_by,
          sphere=sphere,
      )
  
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 15 for calling a global function with example usage: plot_evoked_image(evoked, picks, exclude, unit, show, clim, xlim, proj, units, scalings, titles, axes, cmap, colorbar, mask, mask_style, mask_cmap, mask_alpha, time_unit, show_names, group_by, sphere) and returns: _plot_evoked