code: def plot_snr_estimate(
      evoked, inv, show=True, axes=None, verbose=None
  ):
      """Plot a data SNR estimate.
  
      Parameters
      ----------
      evoked : instance of Evoked
          The evoked instance. This should probably be baseline-corrected.
      inv : instance of InverseOperator
          The minimum-norm inverse operator.
      show : bool
          Show figure if True.
      axes : instance of Axes | None
          The axes to plot into.
  
          .. versionadded:: 0.21.0
      %(verbose)s
  
      Returns
      -------
      fig : instance of matplotlib.figure.Figure
          The figure object containing the plot.
  
      Notes
      -----
      The bluish green line is the SNR determined by the GFP of the whitened
      evoked data. The orange line is the SNR estimated based on the mismatch
      between the data and the data re-estimated from the regularized inverse.
  
      .. versionadded:: 0.9.0
      """
      import matplotlib.pyplot as plt
  
      from ..minimum_norm import estimate_snr
  
      snr, snr_est = estimate_snr(evoked, inv)
      _validate_type(axes, (None, plt.Axes))
      if axes is None:
          _, ax = plt.subplots(1, 1, layout="constrained")
      else:
          ax = axes
          del axes
      fig = ax.figure
      lims = np.concatenate(
          [evoked.times[[0, -1]], [-1, snr_est.max()]]
      )
      ax.axvline(0, color="k", ls=":", lw=1)
      ax.axhline(0, color="k", ls=":", lw=1)
      # Colors are "bluish green" and "vermilion" taken from:
      #  http://bconnelly.net/2013/10/creating-colorblind-friendly-figures/
      hs = list()
      labels = ("Inverse", "Whitened GFP")
      hs.append(
          ax.plot(evoked.times, snr_est, color=[0.0, 0.6, 0.5])[0]
      )
      hs.append(
          ax.plot(evoked.times, snr - 1, color=[0.8, 0.4, 0.0])[0]
      )
      ax.set(
          xlim=lims[:2], ylim=lims[2:], ylabel="SNR", xlabel="Time (s)"
      )
      if evoked.comment is not None:
          ax.set_title(evoked.comment)
      ax.legend(hs, labels, title="Estimation method")
      plt_show(show)
      return fig
  
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 18 for calling a global function with example usage: plot_snr_estimate(evoked, inv, show, axes, verbose) and returns: fig