code: def _handle_styles_pce(styles, linestyles, colors, cmap, conditions):
      """Check and assign styles for plot_compare_evokeds."""
      styles = deepcopy(styles)
      # validate style dict structure (doesn't check/assign values yet)
      tags = set(tag for cond in conditions for tag in cond.split("/"))
      if styles is None:
          styles = {cond: dict() for cond in conditions}
      styles = _validate_style_keys_pce(styles, conditions, tags)
      # validate color dict
      colors, color_vals = _validate_colors_pce(
          colors, cmap, conditions, tags
      )
      all_int = all(
          [isinstance(_color, Integral) for _color in color_vals]
      )
      # instantiate cmap
      cmap, colorbar_title = _validate_cmap_pce(
          cmap, colors, color_vals
      )
      # validate linestyles
      linestyles = _validate_linestyles_pce(
          linestyles, conditions, tags
      )
  
      # prep for colorbar tick handling
      colorbar_ticks = None if cmap is None else dict()
      # array mapping color integers (indices) to tick locations (array values)
      tick_locs = np.linspace(0, 1, 2 * len(color_vals) + 1)[1::2]
  
      # transfer colors/linestyles dicts into styles dict; fall back on defaults
      color_and_linestyle = dict(color=colors, linestyle=linestyles)
      for cond, cond_styles in styles.items():
          for _name, _style in color_and_linestyle.items():
              cond_styles = _populate_style_dict_pce(
                  cond, cond_styles, _name, _style, cmap
              )
          # convert numeric colors into cmap color values; store colorbar ticks
          if cmap is not None:
              color_number = cond_styles["color"]
              cond_styles["color"] = cmap(color_number)
              tick_loc = (
                  tick_locs[color_number] if all_int else color_number
              )
              key = cond_styles.pop("cmap_label", cond)
              colorbar_ticks[key] = tick_loc
  
      return (
          styles,
          linestyles,
          colors,
          cmap,
          colorbar_title,
          colorbar_ticks,
      )
  
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 26 for calling a global function with example usage: _handle_styles_pce(styles, linestyles, colors, cmap, conditions) and returns: styles,  linestyles,  colors,  cmap,  colorbar_title,  colorbar_ticks