class_docstr: A base class containing for the 2D browser.
  
  This class contains all backend-independent attributes and methods.
class_docstr_tok: ["A","base","class","containing","for","the","2D","browser",".","This","class","contains","all","backend-independent","attributes","and","methods","."]
docstr: Set up colors for annotations; init some annotation vars.
docstr_tok: ["Set","up","colors","for","annotations",";","init","some","annotation","vars","."]
code: def _setup_annotation_colors(self):
      """Set up colors for annotations; init some annotation vars."""
      segment_colors = getattr(
          self.mne, "annotation_segment_colors", dict()
      )
      labels = self._get_annotation_labels()
      colors, red = _get_color_list(annotations=True)
      color_cycle = cycle(colors)
      for key, color in segment_colors.items():
          if color != red and key in labels:
              next(color_cycle)
      for idx, key in enumerate(labels):
          if key.lower().startswith("bad") or key.lower().startswith(
              "edge"
          ):
              segment_colors[key] = red
          elif key in segment_colors:
              continue
          else:
              segment_colors[key] = next(color_cycle)
      self.mne.annotation_segment_colors = segment_colors
      # init a couple other annotation-related variables
      self.mne.visible_annotations = {label: True for label in labels}
      self.mne.show_hide_annotation_checkboxes = None
  
imports: import importlib
  from abc import ABC, abstractmethod
  from collections import OrderedDict
  from contextlib import contextmanager
  from copy import deepcopy
  from itertools import cycle
  import numpy
  from .._fiff.pick import _DATA_CH_TYPES_SPLIT
  from ..defaults import _handle_default
  from ..filter import _iir_filter, _overlap_add_filter
  from ..fixes import _compare_version
  from ..utils import _check_option, _get_stim_channel, _validate_type, get_config, logger, set_config, verbose
  from .backends._utils import VALID_BROWSE_BACKENDS
  from .utils import _get_color_list, _setup_plot_projector, _show_browser
label_desc: Use image node_id 3 for calling the BrowserBase obj's underlying member method code with example usage: obj._setup_annotation_colors() without return types