code: def test_raw_array_orig_times():
      """Test combining with RawArray and orig_times."""
      data = np.random.randn(2, 1000) * 10e-12
      sfreq = 100.0
      info = create_info(
          ch_names=["MEG1", "MEG2"], ch_types=["grad"] * 2, sfreq=sfreq
      )
      meas_date = _handle_meas_date(np.pi)
      with info._unlock():
          info["meas_date"] = meas_date
      raws = []
      for first_samp in [12300, 100, 12]:
          raw = RawArray(data.copy(), info, first_samp=first_samp)
          ants = Annotations(
              [1.0, 2.0], [0.5, 0.5], "x", np.pi + first_samp / sfreq
          )
          raw.set_annotations(ants)
          raws.append(raw)
      assert_allclose(raws[0].annotations.onset, [124, 125])
      raw = RawArray(data.copy(), info)
      assert not len(raw.annotations)
      raw.set_annotations(Annotations([1.0], [0.5], "x", None))
      assert_allclose(raw.annotations.onset, [1.0])
      raws.append(raw)
      raw = concatenate_raws(raws, verbose="debug")
      assert (
          raw.info["meas_date"]
          == raw.annotations.orig_time
          == meas_date
      )
      assert_and_remove_boundary_annot(raw, 3)
      assert_array_equal(
          raw.annotations.onset,
          [124.0, 125.0, 134.0, 135.0, 144.0, 145.0, 154.0],
      )
      raw.annotations.delete(2)
      assert_array_equal(
          raw.annotations.onset,
          [124.0, 125.0, 135.0, 144.0, 145.0, 154.0],
      )
      raw.annotations.append(5, 1.5, "y")
      assert_array_equal(
          raw.annotations.onset,
          [5.0, 124.0, 125.0, 135.0, 144.0, 145.0, 154.0],
      )
      assert_array_equal(
          raw.annotations.duration, [1.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]
      )
      assert_array_equal(
          raw.annotations.description,
          ["y", "x", "x", "x", "x", "x", "x"],
      )
  
      # These three things should be equivalent
      stamp = _dt_to_stamp(raw.info["meas_date"])
      orig_time = _handle_meas_date(stamp)
      for empty_annot in (
          Annotations([], [], [], stamp),
          Annotations([], [], [], orig_time),
          Annotations([], [], [], None),
          None,
      ):
          raw.set_annotations(empty_annot)
          assert isinstance(raw.annotations, Annotations)
          assert len(raw.annotations) == 0
          assert raw.annotations.orig_time == orig_time
  
imports: import sys
  from collections import OrderedDict
  from datetime import datetime, timedelta, timezone
  from itertools import repeat
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_equal
  from pytest import approx
  import mne
  from mne import Annotations, Epochs, annotations_from_events, count_annotations, create_info, events_from_annotations, read_annotations
  from mne.annotations import _handle_meas_date, _read_annotations_txt_parse_header, _sync_onset
  from mne.datasets import testing
  from mne.io import RawArray, concatenate_raws, read_raw_fif
  from mne.utils import _dt_to_stamp, _raw_annot, _record_warnings, _stamp_to_dt, assert_and_remove_boundary_annot, catch_logging, check_version
label_desc: Use image node_id 4 for calling a global function with example usage: test_raw_array_orig_times() without return types