code: def _plot_update_evoked(params, bools):
      """Update the plot evoked lines."""
      picks, evoked = (params[k] for k in ("picks", "evoked"))
      projs = [
          proj
          for ii, proj in enumerate(params["projs"])
          if ii in np.where(bools)[0]
      ]
      params["proj_bools"] = bools
      new_evoked = evoked.copy()
      new_evoked.info["projs"] = []
      new_evoked.add_proj(projs)
      new_evoked.apply_proj()
      for ax, t in zip(params["axes"], params["ch_types_used"]):
          this_scaling = params["scalings"][t]
          idx = [
              picks[i]
              for i in range(len(picks))
              if params["types"][i] == t
          ]
          D = this_scaling * new_evoked.data[idx, :]
          if params["plot_type"] == "butterfly":
              for line, di in zip(ax.lines, D):
                  line.set_ydata(di)
          else:
              ax.images[0].set_data(D)
      params["fig"].canvas.draw()
  
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 16 for calling a global function with example usage: _plot_update_evoked(params, bools) without return types