code: def _read_brainstorm_annotations(fname, orig_time=None):
      """Read annotations from a Brainstorm events_ file.
  
      Parameters
      ----------
      fname : path-like
          The filename
      orig_time : float | int | instance of datetime | array of int | None
          A POSIX Timestamp, datetime or an array containing the timestamp as the
          first element and microseconds as the second element. Determines the
          starting time of annotation acquisition. If None (default),
          starting time is determined from beginning of raw data acquisition.
          In general, ``raw.info['meas_date']`` (or None) can be used for syncing
          the annotations with raw data if their acquisition is started at the
          same time.
  
      Returns
      -------
      annot : instance of Annotations | None
          The annotations.
      """
  
      def get_duration_from_times(t):
          return t[1] - t[0] if t.shape[0] == 2 else np.zeros(len(t[0]))
  
      annot_data = loadmat(fname)
      onsets, durations, descriptions = (list(), list(), list())
      for label, _, _, _, times, _, _ in annot_data["events"][0]:
          onsets.append(times[0])
          durations.append(get_duration_from_times(times))
          n_annot = len(times[0])
          descriptions += [str(label[0])] * n_annot
  
      return Annotations(
          onset=np.concatenate(onsets),
          duration=np.concatenate(durations),
          description=descriptions,
          orig_time=orig_time,
      )
  
imports: import json
  import os.path
  import re
  import warnings
  from collections import Counter, OrderedDict
  from collections.abc import Iterable
  from copy import deepcopy
  from datetime import datetime, timedelta, timezone
  from itertools import takewhile
  from textwrap import shorten
  import numpy
  from scipy.io import loadmat
  from ._fiff.constants import FIFF
  from ._fiff.open import fiff_open
  from ._fiff.tag import read_tag
  from ._fiff.tree import dir_tree_find
  from ._fiff.write import _safe_name_list, end_block, start_and_end_file, start_block, write_double, write_float, write_name_list_sanitized, write_string
  from .utils import _check_dict_keys, _check_dt, _check_fname, _check_option, _check_pandas_installed, _check_time_format, _convert_times, _DefaultEventParser, _dt_to_stamp, _is_numeric, _mask_to_onsets_offsets, _on_missing, _pl, _stamp_to_dt, _validate_type, check_fname, fill_doc, int_like, logger, verbose, warn
label_desc: Use image node_id 12 for calling a global function with example usage: _read_brainstorm_annotations(fname, orig_time) and returns: Annotations, unknown