code: def test_remove_annotations(raw, hide_which, browser_backend):
      """Test that right-click doesn't remove hidden annotation spans."""
      descriptions = ["foo", "bar"]
      ann = Annotations(
          onset=[2, 1], duration=[1, 3], description=descriptions
      )
      raw.set_annotations(ann)
      assert len(raw.annotations) == 2
      fig = raw.plot()
      fig._fake_keypress("a")  # start annotation mode
      if browser_backend.name == "matplotlib":
          checkboxes = fig.mne.show_hide_annotation_checkboxes
          for which in hide_which:
              checkboxes.set_active(which)
      else:
          for hide_idx in hide_which:
              hide_key = descriptions[hide_idx]
              fig.mne.visible_annotations[hide_key] = False
          fig._update_regions_visible()
      # always click twice: should not affect hidden annotation spans
      for _ in descriptions:
          fig._fake_click((2.5, 0.1), xform="data", button=3)
      assert len(raw.annotations) == len(hide_which)
  
imports: import itertools
  import os
  from copy import deepcopy
  import matplotlib.pyplot
  import numpy
  import pytest
  from matplotlib import backend_bases
  from numpy.testing import assert_allclose
  from mne import Annotations, create_info, pick_types
  from mne._fiff.pick import _DATA_CH_TYPES_ORDER_DEFAULT, _PICK_TYPES_DATA_DICT
  from mne.annotations import _sync_onset
  from mne.datasets import testing
  from mne.io import RawArray
  from mne.utils import _assert_no_instances, _dt_to_stamp, _record_warnings, check_version, get_config, set_config
  from mne.viz import plot_raw, plot_sensors
  from mne.viz.utils import _fake_click, _fake_keypress
label_desc: Use image node_id 26 for calling a global function with example usage: test_remove_annotations(raw, hide_which, browser_backend) without return types