code: def _find_unique_events(events):
      """Uniquify events (ie remove duplicated rows."""
      e = np.ascontiguousarray(events).view(
          np.dtype((np.void, events.dtype.itemsize * events.shape[1]))
      )
      _, idx = np.unique(e, return_index=True)
      n_dupes = len(events) - len(idx)
      if n_dupes > 0:
          warn(
              "Some events are duplicated in your different stim channels."
              " %d events were ignored during deduplication." % n_dupes
          )
      return events[idx]
  
imports: from collections.abc import Sequence
  from pathlib import Path
  import numpy
  from ._fiff.constants import FIFF
  from ._fiff.open import fiff_open
  from ._fiff.pick import pick_channels
  from ._fiff.tag import read_tag
  from ._fiff.tree import dir_tree_find
  from ._fiff.write import end_block, start_and_end_file, start_block, write_int
  from .utils import _check_fname, _check_integer_or_list, _check_on_missing, _check_option, _get_stim_channel, _on_missing, _pl, _validate_type, check_fname, fill_doc, logger, verbose, warn
label_desc: Use image node_id 9 for calling a global function with example usage: _find_unique_events(events) and returns: events